home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-09-30 | 154.5 KB | 4,186 lines |
-
-
- The TesSeRact CXL User Interface Development System
-
-
- Installation and User's Guide
-
-
- Version 5.51 -- October 1, 1990
-
-
- Copyright 1990, Innovative Data Concepts
- All Rights Reserved
-
-
- Innovative Data Concepts
- 1657 The Fairways
- Suite 101
- Jenkintown, PA 19046
- Voice: 1-215-884-3373
- Orders: 1-800-926-4551
- FAX: 1-215-886-4225
-
-
-
- TCXL is part of IDC's TesSeRact Development Tools series of programmer's
- products.
-
-
- Acknowledgements
-
- Thanks to my loving wife Anne Marie, without whom life would be nothing.
-
- A very special thanks to Tina, who keeps this place running.
-
- And we can't forget Michael Mohle', who slaved over the code and made it
- all work.
-
- Without beta testers, where are we in this business? I've had a great crew
- for TCXL, much too numerous to mention individually. But a few deserve
- extra kudos:
- Doug MacLean, who selflessly gave his time and effort as needed.
- Dave Seidel, who found more critters than we wanted him to, and
- received the "Golden Cockroach" award for his trouble.
- Ed Mulroy, who called at ungodly hours while writing batch files.
- Peter Schultz, for requesting enhancements, providing the code for
- them, and then reporting bugs in the way they worked because he
- changed his mind!
- Mike Burns, for finding a few problems that were causing us to lose
- our hair.
- And we must mention Gary Weinfurther, who kept finding those little
- gnats even after we thought the code was finished.
- And all the rest .....
-
- Thanks, everyone!
- This document; other accompanying written and disk-based notes and
- specifications; and all referenced and related program files accompanying
- this document are copyrighted by Innovative Data Concepts. For ordering
- information, see the ORDER.DOC file provided with this package. For
- shareware distribution requirements, see the VENDOR.DOC file.
-
-
-
-
-
- _______
- ____|__ | (R)
- --| | |-------------------
- | ____|__ | Association of
- | | |_| Shareware
- |__| o | Professionals
- -----| | |---------------------
- |___|___| MEMBER
-
-
- The TesSeRact Development Tools are distributed as shareware -- this means
- that we encourage users, subject to restrictions described in the License
- Agreement, to share copies of this program with friends, associates and
- bulletin boards. You may not share the registered version of The TesSeRact
- Development Tools; however, you may request a free shareware disk by
- completing the form in VENDOR.DOC.
-
- If you make copies of The TesSeRact Development Tools, you must include all
- files in the original distribution files, as well as the documentation
- archive. You are not permitted to distribute The TesSeRact Development
- Tools without this documentation.
-
- Innovative Data Concepts is a member of the Association of Shareware
- Professionals. The ASP has established stringent standards for its
- members. ASP wants to make sure that the shareware principle works for
- you. If you are unable to resolve a problem with an ASP member (other than
- technical support), ASP may be able to help. Please write to the ASP
- Ombudsman at P.O. Box 5786, Bellevue, WA 98006.
-
-
- Trademarks
-
- SWAPSK, SWAPSP, SWAPTN, SWAPMT, SWAPMM, SWAPSH, SWAPDT, SWAPNG and The
- SWAP Utilities are trademarks of Innovative Data Concepts.
- TesSeRact is a trademark of Innovative Data Concepts
- CompuServe is a registered trademark of CompuServe Incorporated.
- DESQview is a trademark of Quarterdeck Office Systems.
- Epson is a registered trademark of Seiko Epson Corporation.
- IBM is a registered trademark of International Business Machines.
- LIM and EMS are trademarks of Lotus, Intel, and Microsoft
- Corporations.
- Lotus is a registered trademark of Lotus Development Corporation.
- Microsoft is a registered trademark of Microsoft Corporation.
- Turbo C and Turbo C++ are registered trademarks of Borland
- International.
- UltraVision is a trademark of Personics, Inc.
- Zortech is a trademark of Zortech Inc.
-
- Page ii TesSeRact CXL V5.5 User's Guide
- Table of Contents
- Introductory Notes.............................................ii
- General Information.................................................1
- Features Overview...............................................1
- Supported Standards.............................................3
- New in Version 5.5..............................................3
- Technical Support...................................................3
- Bug Fixes, Updates, Etc.........................................4
- About Innovative Data Concepts......................................4
- IDC Products....................................................5
- Installation........................................................6
- Converting Your Code From CXL 5.x...................................7
- The TCXL Tools......................................................8
- Using Library Functions............................................11
- Compiling and Linking..........................................12
- Library Organization...........................................13
- Future Planning................................................14
- Using the TCXL Systems.............................................14
- OverView.......................................................14
- Menu System....................................................15
- Entry System...................................................17
- Using Format Control Characters............................20
- Help System....................................................20
- Building Help Files........................................22
- Selection System...............................................23
- Window System..................................................23
- Display System.................................................24
- Input System...................................................24
- Strings System.................................................24
- Information Subsystem..........................................24
- Memory Subsystem...............................................24
- Printer Subsystem..............................................25
- OpSys Subsystem................................................25
- Video Access Subsystem.........................................25
- Keyboard Access Subsystem......................................26
- Mouse Access Subsystem.........................................26
- Conversion Subsystem...........................................26
- Format Control Subsystem.......................................26
- Near/Far Subsystem.............................................26
- Header File Descriptions...........................................27
- C Header Files.................................................27
- Assembler Include Files........................................27
- Predefined Types...................................................28
- Portability and Shorthand Notation.............................28
- Standard Object, Pointer and Indirect Types....................29
- TCXL-specific type-aliases.....................................30
- Common Function Pointer Types..................................30
- Structures, Unions and Typedefs....................................30
- Menu System....................................................31
- Mctl...................................................31
- Idf....................................................32
- Mdf....................................................33
- Entry System...................................................34
- Fdf....................................................34
- Edf....................................................35
- Help System....................................................35
- Hctl...................................................36
-
- TesSeRact CXL V5.5 User's Guide Page iii
- Window System..................................................36
- Box....................................................36
- Ttl....................................................37
- Wdf....................................................37
- Wctl...................................................38
- Information Subsystem..........................................38
- Hdw....................................................38
- Tcxl...................................................39
- Memory Subsystem...............................................40
- _Mem...................................................40
- OpSys Subsystem................................................41
- Ffb....................................................41
- Video Access Subsystem.........................................41
- Vcel...................................................41
- Vcse...................................................42
- Vpos...................................................42
- Vctl...................................................43
- Keyboard Access Subsystem......................................43
- Kcod...................................................43
- Kbnd...................................................44
- Kctl...................................................44
- Mouse Access Subsystem.........................................45
- Mou....................................................45
- Format Control Subsystem.......................................46
- Fmt....................................................46
- Control Structures and Macros......................................46
- Menu System....................................................47
- _MnuCtl................................................47
- Entry System...................................................49
- _EntCtl................................................49
- Selection System...............................................51
- SelPtr.................................................51
- SelNdx.................................................51
- Help System....................................................51
- _HlpCtl................................................51
- Window System..................................................52
- _WinCtl................................................52
- Information Subsystem..........................................54
- _HdwCtl................................................54
- _TcxlCtl...............................................55
- Memory Subsystem...............................................56
- _MemCtl................................................56
- Printer Subsystem..............................................59
- Printer................................................59
- OpSys Subsystem................................................59
- OpSys..................................................59
- Video Access Subsystem.........................................60
- _VidCtl................................................60
- Keyboard Access Subsystem......................................63
- _KeyCtl................................................63
- _KeyQue................................................63
- Mouse Access Subsystem.........................................64
- _MouCtl................................................64
- Format Control Subsystem.......................................65
- _FmtCtl................................................65
- COPYRIGHT NOTICE AND LICENSE.......................................67
- Warranty.......................................................67
-
- Page iv TesSeRact CXL V5.5 User's Guide
-
-
- General Information
-
- The TCXL library is intended to be a supplement to your C compiler's
- standard run-time library. It contains over 375 multi-purpose functions
- which provide a variety of capabilities. It is available for several
- popular C compilers including Microsoft C, QuickC, Turbo C/C++, and Zortech
- C/C++. These routines were written in highly-optimized C and assembler
- code ensuring maximum program speed, minimum program size, easy
- modification, and increased portability.
-
-
- Features Overview
-
- o Custmized Bar Menus.
- You can easily create pop-up, pull-down, and Lotus-style menus,
- as well as any other custom menu that you can define. Features
- full mouse support, nonselectable items, global hot keys, and
- more.
-
- o Multi-Field Formatted Data Entry.
- You can create data entry forms that consist of one or more input
- fields. You have full control over user input and can tie
- validation functions into each input field. Features alpha and
- numeric justification, capitalization conversion, formatting
- characters, and a large assortment of editing keys. You may also
- tie each field to a hot-key, and move between fields using a
- mouse.
-
- o Context-Sensitive Help.
- Help files are indexed for speed and categories can be cross-
- referenced. Help can be applied at the global, window, menu
- item, and input field levels.
-
- o Powerful Selection Capabilities.
- TCXL has scrollable pick menus, that allow you to pick one item
- from a list of items. Features full mouse support and scroll
- bars. There is also a dedicated file picker that uses this
- feature to let you pick from a list of files, very similar to the
- way that the Turbo C and QuickC environments' file pickers work,
- and a built-in video attribute selector.
-
- o Full-Featured Window Control
- Allows as many open windows as memory permits. Windows can be
- stacked, tiled, shadowed, moved, resized, and changed in many
- other ways. There are more than 75 functions designed to handle
- windowed output.
-
- o User-defined Input Features
- TCXL's Input System provides a consistent interface between the
- hardware-dependent input devices and TCXL's output systems. This
- system features both formatted and unformatted user input, with
- varying levels of output control.
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 1
- o Hardware-Independent Display Control
- By separating the display from the video hardware, TCXL allows
- the programmer direct control of the display without device
- dependence. TCXL comes with several output methods built-in,
- including direct screen writing, direct screen writing with CGA
- snow elimination, and video BIOS writes. Support for the
- DESQview/Windows/TopView interface is automatic when writing
- direct to the video buffer areas.
-
- o Nonstandard Video Sizes
- EGA 43 and VGA 50-line modes are fully supported and TCXL
- provides functions to directly change to and from these modes.
- TCXL's video functions are also compatible with nonstandard modes
- such as 132x25 and 120x43.
-
- o Advanced String Manipulation
- There are nearly 40 string manipulation functions that perform
- searching, replacing, formatting, conversion, rotating, shifting,
- pattern matching, and other string operations.
-
- o Automatic Mouse Support
- If you write your program using TCXL, the mouse will
- automatically be enabled in Menus, Entry Forms and Selection
- lists. No programmer knowledge or manipulation of mice is
- necessary! For those whose applications require more direct
- mouse control, TCXL can have button-presses translated into
- keystrokes and movements into arrow keys. Low-level functions
- are provided for directly manipulating Microsoft-compatible mice,
- and TCXL supports both two and three-button mice.
-
- o Keyboard Management
- Allows both high and low-level control over the keyboard. There
- are function for manipulating the internal input queue, as well
- as for manipulating the BIOS hardware options.
-
- o Expanded/Extended Memory
- TCXL has a full set of routines for accessing Expanded Memory
- through tre EMS specification, and for accessing Extended Memory
- through the XMS specification. TCXL will also regognize the
- presence of advanced memory management schemes such as VCPI and
- DPMI.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 2 TesSeRact CXL V5.5 User's Guide
- Supported Standards
-
- TCXL supports all the current memory management standards currently
- available. This includes the DOS Protected Mode Interface Specification
- (DPMI) Version 0.9, the Virtual Control Program Interface (VCPI) Version
- 1.0, the eXtended Memory Specification (XMS) Version 2.0, and the Expanded
- Memory Specification (EMS) Version 4.0. Details about these four standards
- are discussed in the chapter about the Memory Subsystem.
-
- In addition, TCXL provides direct support for Personics' UltraVision(TM)
- program. Ultravision is an EGA/VGA video control program with support for
- multiple screen fonts, multiple screen sizes and higher resolution. TCXL
- will automatically detect the presence of UltraVision, and provides low-
- level routines to manipulate the size of the video display (See Page 26).
- For more information about Ultravision, call Personics at 1-800-445-3311 or
- 1-508-897-1575.
- New in Version 5.5
-
- o eXtended Memory Specification (XMS) support, including access to
- Upper Memory Blocks (UMBs) and the High Memory Area (HMA).
-
- o UltraVision(TM) support.
-
- o Enhanced mouse support.
-
- o New Entry System fields, including floating point numberic and
- currency.
-
- o Hardware-dependent routines rewritten in assembler for size and
- speed.
-
- o Standardized Function naming conventions.
-
- o Discrete hardware-level subsystems that allow for future
- portability.
-
- o Approximately 75 new functions, plus macros to access all global
- structures and unions, ensuring portability with future releases.
-
-
- Technical Support
-
- The first stop for IDC Technical Support is CompuServe. Innovative Data
- Concepts has a support conference on the PCVENC forum, in Subtopic 6. All
- IDC shareware products are available for download from CompuServe in this
- library, and technical support is available in the message section.
-
- The next stop are the BBS networks. IDC maintains a support conference on
- RIME/RelayNet, and is active in the C Language Conference. If you have
- access to FidoNet, you can find us in the C Echo, as well as in the CXL
- Echo. On InterLink, we can be found in the C Language Conference, as well
- as on our soon-to-be-opened IDC conference.
-
- If you have access to MCIMAIL, we can be reached at 315-5415.
-
- If all else fails, give us a call at 1-215-884-3373. We'll be happy to
- help.
-
- TesSeRact CXL V5.5 User's Guide Page 3
-
- Bug Fixes, Updates, Etc.
-
-
- A bug is a bug is a bug. Anyone who calls it something else is just trying
- to hide it.
-
- Perfect software is impossible. And with a product as complex and varied
- as TCXL, we don't expect to have uncovered everything (although we
- certainly have tried!).
-
- For this purpose, IDC has set up a network of BBS systems around the world
- that are authorized to carry updates/enhancements to our products. Each of
- these boards will have a local, IDC support conference, and the files
- available for download there will include all our shareware products, as
- well as any updates/enhancements to those products.
-
- Source code fixes and will be distributed in the DFC_DSE file format.
- These two programs are included in your TCXL package, and are normally
- placed in the BIN directory. This allows us to maintain public support
- sections around the world, without need for registration verification,
- while maintaining the integrity of our source code.
-
- A current listing of BBS' carrying the IDC Support Conference is stored in
- the BBSLIST.DOC file in your DOC directory.
-
-
- About Innovative Data Concepts
-
- Innovative Data Concepts is a software publishing firm owned and operated
- by Chip Rabinowitz. IDC's SWAP Utility product line features products that
- make more efficient use of your computer's memory and other resources.
- IDC's TesSeRact Development Tools series focuses on programmers and
- application developers, giving them access to high-quality,
- memory/resource-efficient developer's tools.
-
- Rabinowitz is an Assistant Sysop on the Computer Language Magazine Forum on
- CompuServe Information Service and also provides technical support for
- Borland International as a member of "Team Borland" on their Compuserve
- Forums, in the areas of Turbo C, Turbo Assembler, Turbo Debugger, SideKick
- Plus, Quattro Pro and Paradox.
-
- The technology used by the SWAP Utility programs may be applied to other
- resident programs. Developer's inquires are welcome. Innovative Data
- Concepts is currently researching other applications of SWAP technology. If
- you have any suggestions/comments, please contact IDC.
-
-
-
-
-
-
-
-
-
-
-
-
- Page 4 TesSeRact CXL V5.5 User's Guide
- IDC Products
-
-
- The SWAP Utilities . . . make it possible to load many popular TSRs in less
- than 8K of your precious DOS memory. With a "High-DOS" memory manager,
- these resident programs require 0K of DOS memory.
-
- SWAPDOS . . . lets you switch between two large applications, keeping your
- place in one while working in the other. Swap the first application (and
- TSRs) drivers to EMS, XMS or disk, and load another program. Have Microsoft
- Word swapped to EMS, while looking at your Lotus 1-2-3 spreadsheet.
-
- The TesSeRact Ram Resident Development System . . . has been acclaimed by
- many to be the standard toolkit for TSR development. This toolkit provides
- developers with everything needed to create compatible TSRs that are well-
- behaved in today's complex environment.
-
- And, of course, the TesSeRact CXL User Interface Development System.
-
- For complete price and ordering information, see the ORDER.DOC file
- provided with this package. For shareware distribution requirements, see
- the VENDOR.DOC file.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 5
- Installation
-
-
- STEP 1.......BUILD BASE DIRECTORY
-
- The Shareware Version of the TCXL User Interface Development System is
- normally distributed on diskette or in a compressed archive.
-
- If you received a compressed archive, either from a BBS or from a Disk
- Vendor, follow the instructions provided to extract these files into a
- "\TCXL55" directory. Then skip to Step 2.
-
- If you received a diskette either directly from IDC or from another source,
- put the diskette in your drive, change to the root directory of the drive
- you wish to install TCXL on, and give the command:
-
- A:COPYTCXL A
-
- or
-
- B:COPYTCXL B
-
-
- depending, of course, on which drive you install from. COPYTCXL will
- create a directory called "\TCXL55", and will copy a series of self-
- extracting archive files into the directory.
-
- In your TCXL55 directory, there will be a file called FILES.CXL. Verify
- that all the files described in FILES.CXL are actually present. If not,
- contact whoever supplied you with your copy of TCXL.
-
- Please note that Innovative Data Concepts normally only provides the small
- model libraries for shareware distribution. If you need the large model
- libraries to fully evaluate the product, contact either IDC or one of our
- foreign distributors. If you receive this diskette from IDC, the charge
- will be $5.00 within the US, $7.00 in Canada and Mexico, and $10.00 to
- other locations. Our distributors may have other pricing policies --
- contact them for more information.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 6 TesSeRact CXL V5.5 User's Guide
- STEP 2.......RUN START.BAT
-
- Once the files are in your TCXL55 directory, you are now able to actually
- install the product. Run the START.BAT file that is now in your TCXL55
- directory. This will extract the header files and libraries, and give you
- the option to extract the documentation. All necessary subdirectories will
- automatically be created.
-
- The libraries are are in different directories depending upon which
- compiler you are using. They are listed below with the letter 'x' inserted
- to indicate where the memory model should be ('s','m','c', and 'l' for
- small, medium, compact and large respectively).
-
-
- Compiler Library
- ------------------------------------
- MSC 6 TCXL\M6\TCXLMS6x.LIB
- QC 2.5 same as above
-
- MSC 5.1 TCXL\M5\TCXLMS5x.LIB
- QC before 2.5 same as above
-
- TC 2 / TC++ TCXL\TC\TCXLTCx.LIB
-
- Zortech C++ TCXL\ZTC\TCXLZTx.LIB
-
- The 'x' above represents one of the letters s, m, c or l.
-
-
- STEP 3.......COMPILE/LINK DEMO
-
- At the completion of START.BAT, you will be given a pair of environment
- variables to create: TCXL_A and TCXL_C. Follow the directions, and add
- these two variables using the DOS SET command.
-
- Next, change to the \TCXL55\DEMO directory. Depending on the source of
- your copy of TCXL, a compiled demonstration program may or may not be
- provided. To create a demo program, execute the MAKEDEMO.BAT file. This
- will compile/link the TCXL Demonstration Program using the default options.
-
-
-
-
-
- Converting Your Code From CXL 5.x
-
- To convert your existing CXL projects to use TCXL 5.5, we have provided
- RP.EXE and CONVERT.BAT (see descriptions below).
-
- Simply copy CONVERT.BAT to your project directory, edit the batch file to
- show the appropriate paths, and run the batch file. This will convert
- between 90 and 95 percent of your code .... your compiler will catch the
- rest of the changes.
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 7
- The TCXL Tools
-
- Every good programmer has a set of tools -- so we thought we'd share a few
- with you. We use these tools internally during testing, as well as for
- completing the libraries themselves. Please note that these tools are only
- provided by IDC with the registered user package. The individual authors
- of the utilities may choose to release them directly; however, that is up
- to the individual author, and IDC will neither encourage nor discourage
- them in this process.
-
- ---------------------------------------------------------------------------
-
- NAME.........MakHlp
- Copyright (c) 1987-1990, Innovative Data Concepts. All Rights Reserved
-
- DESCRIPTION
- This program compiles and indexes a TCXL help file.
-
- SYNTAX.......MakHlp [-tn] <ifil> <ofil>
- Where : -t Optional tab-width [2..32]. Default is 8
- <ifil> input ASCII TCXL help-file
- <ofil> output compiled TCXL help-file
-
- USAGE
- See the discussion on the TCXL Help System for more details.
-
- ---------------------------------------------------------------------------
-
- NAME.........MakRsp
- Copyright (c) 1987-1990, Innovative Data Concepts. All Rights Reserved
-
- DESCRIPTION
- Create response file for TLIB/LIB/ZORLIB.
-
- SYNTAX.......MakRsp <M|T|Z> <S|M|C|L> <A|C>
- Where : <M|T|Z> <M>icrosoft, <T>urbo, or <Z>ortech.
- <S|M|C|L> Memory Model
- <A|C> Source Code is Assembler or C
-
- USAGE
- Used by the TCXL batch files.
-
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 8 TesSeRact CXL V5.5 User's Guide
- NAME.........DifCmp
- Copyright (c) 1985-1990, Princeton-Galax Systems, All Rights Reserved
-
- DESCRIPTION
- FAST, Line-oriented, text-file comparator to generate checksummed
- delta-scripts for the PGS DifEdt stream editor.
-
- SYNTAX.......DifCmp <dfil> <pfil> <cfil>
- .............DifCmp @<rfil>
- Where : <dfil> = Generated delta-script file for PGS DifEdt to edit
- <pfil> into <cfil>.
- <pfil> = Previous version of text-file.
- <cfil> = Current version of text-file.
- <rfil> = Response file of multiple "<dfil> <pfil> <cfil>"
- command lines with optional '#'-prefixed comment
- lines and/or trailing comments.
-
- USAGE
- For more details, see the DifCmp.D file in your BIN directory.
-
- ---------------------------------------------------------------------------
-
- NAME.........DifEdt
- Copyright (c) 1985-1990, Princeton-Galax Systems, All Rights Reserved
-
- DESCRIPTION
- FAST, Line-oriented, text-file stream editor to apply checksummed
- delta-scripts generated by the PGS DifCmp Delta file comparator.
-
- SYNTAX.......DifEdt [-n] [-z] <dfs> <pfs>
- .............DifEdt [-n] [-z] @<rfs>
- Where : -n = Ensure output file has a trailing NewLine.
- -z = Ensure output file has a CP/M-style ^Z EOF for
- certain MS-DOS compilers, etc., that require it.
- <dfs> = Filespec of delta script generated by PGS DifCmp for
- <pfs>.
- <pfs> = Filespec of previous version of text-file. Output
- consists of <pfs> edited IN PLACE by the commands in
- <dfs>.
- <rfs> = Filespec of response file consisting of one or more
- "<dfs> <pfs>" command lines with optional '#'-prefixed
- comment lines and trailing comments.
-
- USAGE
- For more details, see the DifCmp.D file in your BIN directory.
-
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 9
- NAME.........RPL
- RPL Version 2.10 (c) Copyright Doug MacLean 89
-
- DESCRIPTION
- Unix-Style Replace From Script.
-
- SYNTAX.......RPL [options] "search exp" "replacement exp" [files]
- Where :
- -c Print a count of replacements to stderr when done.
- -d Delete the entire line (don't give a replacement expression
- argument).
- -e Take next 2 arguments as search expr and replacement expr.
- -f (Filter) read input from stdin, ouput to stdout.
- -h Help with regular expression syntax.
- -p Print matching expressions at stdout (or stderr if `-f'
- option).
- -s file Take next argument as filename of change script file.
- -u Ignore case.
- -v (Verify) preview and confirm each replacement with options:
- All: Replace all the remaining matches in this file.
- Continue: Replace this one and keep going.
- Once: Replace this one and no others in this file.
- Skip: Don't replace this one, keep going.
- Quit: Don't replace any more in this file.
- Exit: Abort and exit with input file unchanged.
-
- USAGE
- Used to convert source files from CXL 5.2 to TCXL 5.5 (See CONVERT.*
- descriptions)
-
- ---------------------------------------------------------------------------
-
- NAME.........SWAPNG
- Copyright 1989-90, Innovative Data Concepts, All Rights Reserved
-
- DESCRIPTION
- SWAP Utility for The Norton Guides. Shareware Version.
-
- USAGE
- For all details, see the SWAP.DOC file in your BIN directory.
-
- ---------------------------------------------------------------------------
-
- NAME.........CONVERT.001 though CONVERT.008
-
- DESCRIPTION
- Conversion scripts to convert from CXL 5.x to TCXL 5.5
-
- SYNTAX.......RPL -p -s CONVERT.00x filename.c >>convert.log
- Where :
- 'x' is the numbers 1 through 8
- filename.c is the file to convert
- convert.log is a log file that captures RPL output
-
- USAGE
- Use these scripts, in conjunction with RPL, to convert approximately
- 90 percent of your existing CXL 5.x code to TCXL 5.5.
-
- Page 10 TesSeRact CXL V5.5 User's Guide
- ---------------------------------------------------------------------------
-
- NAME.........TCXL.NG
-
- DESCRIPTION
- Norton Guides Help File for TCXL 5.5
-
- USAGE
- Copy the TCXL.NG file to the directory where you store your other NG
- databases, and select "TCXL Help" from the (O)ptions/(D)atabase
- Menu. (Don't you wish they had used TCXL??)
-
- ---------------------------------------------------------------------------
-
- NAME.........TCXL.HLP
-
- DESCRIPTION
- Microsoft Quick Help hypertext online database for TCXL 5.5. This
- facility of the newer Microsoft language products provides complete
- access to all TCXL functions and tables from within the
- Programmer's WorkBench, CodeView, and QuickHelp.
-
- USAGE
- Place TCXL.HLP in the directory with the other help files. To look up
- a function such as MnuBeg(), type:
-
- QH MnuBeg
-
- From the command-line, or place the cursor over the desired function
- name from the workbench, and right clock your mouse (or press
- F1).
- In Quick Help, there is a menu selection at the top of the screen
- called "References." This feature will permit you to call up a
- complete listing of all TCXL functions, and any table you may
- wish to see.
-
- ---------------------------------------------------------------------------
-
-
- Using Library Functions
-
- Every function in the TCXL library has a corresponding prototype in one of
- the distributed header files. In the function reference portion of this
- document, each routine is marked with the appropriate header file. The
- exception is TCXLDEF.H, which is automatically included when you include
- any other TCXL header file.
-
- The header files are system header files, rather than local files; i.e.,
- they should be placed in the same directory as your standard include files,
- and are referenced using angle-brackets (< >) instead of quotes, as in
- previous versions. For example:
-
- #include <dos.h>
- #include <stdio.h>
- #include <TCXLwin.h>
- #include <TCXLvid.h>
-
-
- TesSeRact CXL V5.5 User's Guide Page 11
- Compiling and Linking
-
- The basic command line compiler/linker commands to build your file
- containing TCXL functions are as follows (this does assume that the LIB
- directories and paths have been set up appropriately for your compiler):
-
- Microsoft C:
-
- cl myfile.c tcxlmss.lib
-
- Quick C:
-
- qcl myfile.c tcxlmss.lib
-
- Turbo C/C++:
-
- tcc myfile.c tcxltcs.lib
-
- Zortech C/C++:
-
- ztc myfile tcxlzts.lib
-
- To use TCXL from the Turbo C integrated environment (TC.EXE), you need to
- create a project file containing the name of the TCXL library. You can
- call it MYFILE.PRJ and it can consist of just one line:
-
- myfile.c tcxltcs.lib
-
- Then when you run TC.EXE, set the project file name to MYFILE.PRJ and press
- the Make key.
-
- Please note that if you use the Microsoft Linker, and you use any of the
- large code models (medium or large), you will need to use /SE:768 on the
- link command-line, to tell the linker you've got a lot of segments.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 12 TesSeRact CXL V5.5 User's Guide
- Library Organization
-
- The TCXL library is organized into various systems and subsystems. A quick
- look at the library structure can be of assistance:
-
- User Level: Menu System
- Entry System
- Help System
- Selection System
-
- Middle Level: Window System
- Display System
- Input System
- Strings System
-
- Hardware Level: Information Subsystem
- Memory Subsystem
- Printer Subsystem
- OpSys Subsystem
-
- Bottom Level: Video Access Subsystem
- Keyboard Access Subsystem
- Mouse Access Subsystem
-
- Internal Level: Conversion Subsystem
- Format Control Subystem
- Near/Far Subsystem
-
-
- In our descriptions of the various functions, we will be keeping this
- structure in mind. The User Level of TCXL is all you normally need to
- write fully-featured applications. If your application also needs text-
- based windows, input from the user that is not part of a form, or access to
- video parameters, then you'll also write code that accesses the Middle
- Level of TCXL.
-
- The Hardware Level is next, and is composed of ALL the machine-specific and
- operating-system dependent code. It is separate from the other levels of
- TCXL simply because not all the features at this level will be available
- when TCXL is ported to other platforms. Additionally, none of the higher
- levels are dependent on these routines for their functionality.
-
- The Bottom Level of TCXL is the direct access to the hardware that is used
- by the upper-level systems. A user interface has input and output. TCXL
- supports input through both the mouse and the keyboard, and has output
- though both BIOS routines and direct access to the video hardware.
-
- At the Internal Level are all the internal routines that TCXL needs to do
- its work.
-
- This structure has been designed for a specific purpose: To move TCXL to
- another hardware or software platform, we need only replace the "Bottom
- Level" of the library for routines specific to the environment, and
- recompile with an ANSI-compatible compiler! This might give you a hint of
- some future plans for IDC ....
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 13
- Future Planning
-
- TCXL 5.5 is Innovative Data Concept's initial version of this product.
- Needless to say, we have lots more planned. TCXL 6.0 is due to be released
- in the 1st Qtr 1990, and will include things like a full event-driven
- interface, a configurable printer system, an interface to graphic
- interfaces, and more.
-
- IDC is also planning on porting CXL to different hardware platforms, as
- well as to different PC operating environments. We are actively seeking
- development and marketing partners in this venture. Call us to talk about
- it.
-
-
- Using the TCXL Systems
-
-
- OverView
-
-
- In order to initialize the TCXL low-level routines, and correctly determine
- the configuration of the machine the program will run on, you MUST
- initially make a call to the function TcxlInit(). This function
- initializes the Bottom-Level Subsystems (Video Access, Keyboard Access and
- Mouse Access), as well as fills in the configuration information in the
- _TcxlCtl structure.
-
- The Video Access Subsystem is initialized to use the current screen mode,
- and the current screen dimensions. If Ultravision is in the system, the
- appropriate bytes in _TcxlCtl are set for the current configuration.
-
- The Keyboard Access Subsystem is initialized to use the "old-style"
- keyboard BIOS routines (Int 16h, Fn 00h and 001h). If an enhanced keyboard
- BIOS is detected (TcxlKey macro), then it is possible to ask TCXL to use
- the extended keyboard BIOS calls (Int 16h, Fn 10h and 11h) instead. Call
- _KextOn() to enable the extended BIOS calls.
-
- The Mouse Access Subsystem auto-detects whether a mouse is installed in
- your computer. If a mouse exists, it is initialized, and the mouse is
- turned off. When you call MnuShow(), EntShow(), or any of the Selection
- System functions, the mouse is automatically turned on with full support,
- including a software cursor. You may change this support during processing
- of your own routines, but during menus, entry forms and selections, the
- mouse is automatically active. The mouse buttons also correspond to
- keystrokes: Left=[Enter], Right=[Esc], Middle=[F1]. You may change these
- keys using the Mskeys() function.
-
- Because TcxlInit() initializes the low-level routines, it is not necessary
- for a user program to call VidInit(), MSinit() or KeyInit(). In addition,
- the TcxlTerm() function is automatically installed as an "atexit" routine,
- and is called when your program terminates -- therefore, it is not
- necessary to de-install any of these systems.
-
- TcxlInit() will also call MemInit(), to determine the types of additional
- memory that is installed in the system, and to determine which standards
- set is in use (DPMI, VCPI, etc).
-
-
- Page 14 TesSeRact CXL V5.5 User's Guide
-
- Menu System
-
-
- The TCXL Menu System can be as simple as a single-level popup menu, or as
- complex as a multi-level pull-down bar menu system. No matter how complex
- your menus are, with TCXL you use the same basic calling sequence to define
- them. The basic format (optional calls are in brackets []) is:
-
-
-
- <MnuBeg|MnuAct>
-
- MnuItm
-
- [ItmTxt]
-
- [ItmFun]
-
- [<MnuBeg|MnuAct>]
-
- [MnuItm]
-
- [...]
-
- [MnuEnd]
-
- MnuEnd
-
- MnuShow
-
-
-
- Either MnuBeg() or MnuAct() is required to mark the start of a menu;
- MnuItm() is required to define menu items; MnuEnd() marks the end of a
- menu; and MnuShow() initiates user processing of the entire menu structure.
-
- Notice that you can also define entire menus underneath any individual menu
- item. This allows you to easily create nested menus to aid in building
- complex pull-down and multi-layered menuing systems. There is no limit to
- how deep you can nest sub-menus, with the exception of available memory.
-
- When coding multi-level menu systems, it is a good idea to use indenting as
- shown above to help you distinguish which menu items and menu-ends go with
- which menu-begins.
-
- ItmTxt() and ItmFun() are optional functions. They allow you to attach
- specific features to a particular menu item. If you use either of these
- two functions, they must immediately follow the call to MnuItm() to which
- they pertain.
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 15
- After you define the menu structure and call MnuShow(), the user is allowed
- to make a selection. The following editing keys (editing keys are also
- listed in Appendix F) may be used by the user when processing the menu:
-
-
- Menu Movement Key Action
- ----------------- ------
- LeftArrow..........moves selection bar to item left.
- RightArrow.........moves selection bar to item right.
- UpArrow............moves selection bar to item upwards.
- DownArrow..........moves selection bar to item downwards. If the
- current menu item has a pull-down menu attached, then it
- will be opened for processing.
- Enter..............selects the item that the selection bar is on. If
- selected item has a sub-menu attached, then processing of
- that menu will begin.
- Home...............moves selection bar to upper-leftmost item.
- End................moves selection bar to lower-rightmost item.
- Esc................if Escape checking is on, and you are in the root
- menu, pressing this cancels input and returns a -1. If
- inside a sub-menu, then you will just back up to the
- previous menu.
-
- You can also quick-select a menu item by pressing its highlighted selection
- character, unless this feature is disabled.
-
- Each menu item can have a function and/or sub-menu attached to it. When
- the user selects the menu item, MnuShow() will first check for an attached
- sub-menu. If one exists, it will be processed. Then MnuShow() will check
- for a defined select function. If one exists, then MnuShow() will call it.
-
- This gives you two ways to handle a user selection. The first, as you've
- seen, is to have a function attached to the menu item. For example, if the
- menu item is "(A)dd Record" and it has a select function called
- add_record(), then it will be called upon selecting that menu item. The
- other way to handle a user selection is by using a switch/case to test the
- return value from MnuShow(). This will work best on single-level menus,
- since MnuShow() only returns the tag ID of the root menu's selection, but
- sometimes gives you more flexibility.
-
- Please note that mouse support is automatically activated during menu
- processing, if a mouse has been detected during initialization. Also, be
- aware that the mouse is de-activated during before/after procedures, as
- well as when processing the menu's select functions. Programmers who wish
- to take advantage of the mouse in their own windows (not in one of the
- automatic systems of TCXL) will need to specifically enable the type of
- mouse support they want.
-
-
-
-
-
-
-
-
-
-
-
- Page 16 TesSeRact CXL V5.5 User's Guide
- Entry System
-
-
- Initializing TCXL's multi-field Entry System is very similar to designing
- menus. There are certain functions associated with building an entry form,
- and they must be called in a particular order. The basic format (and
- again, all optional calls are in brackets) of all form structures is:
-
- EntDef
- FldDef
- [FldKey]
- [FldFun]
- EntShow
-
-
- Just three functions are needed to process multi-field formatted input from
- windows. EntDef() is used to mark the beginning of the form; FldDef() is
- used to define the individual data entry fields, and EntShow() marks the
- end of the form and initiates user processing of the form.
-
- FldKey() and FldFun() are optional functions. They allow you to add
- specific procedures to be called before and/or after processing of the
- field. If you use either of these two functions, they must immediately
- follow the call to FldDef() to which they pertain.
-
- The formatted input capabilities of the Entry System are much like those of
- the KvGetFmt() and KwGetFmt() functions in the Input System. The major
- difference is that with the Entry System, you can edit back and forth
- between fields before finally accepting the entry form. Note that the
- Format Control Codes in Appendix E are valid (except where noted) with both
- the Input System and the Entry System.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 17
- In the Entry System, you may set a validation function for each field on
- the form. During processing, EntShow() will call this function after you
- leave the field to validate the information input.. You can use this
- function for validating, modifying, displaying error messages, or just
- about anything. This function must accept a pointer to char for input and
- return either 0 for no error, or the position in the field where the error
- occurred (starting with 1). If the validation function returns non-zero,
- EntShow() forces the user to remain within the field and edit the incorrect
- information. Here's an example field validation function that checks for
- embedded spaces:
-
- IntT check_field_for_embedded_spaces(ChrP input_field)
- {
- IntT current_position = 1,
- error_position = 0;
-
- while(*input_field++ != ' ') /* search for end of text */
- current_position++;
- while(*input_field == ' ') /* search to end of field for*/
-
- { /* non-space characters */
- current_position++;
- input_field++;
- }
- if(*input_field!='\0') /* if at end of field, then */
- error_position = current_position; /* field is invalid */
-
- return(error_position);
- }
-
-
- Once you have defined all input fields with EntDef(), you call EntShow() to
- process them. The user is allowed to move around and edit all of the
- fields. The input fields are validated on the fly and after entering the
- last field. Valid editing keys are listed in Appendix F.
-
- In addition, if you specify a "hotkey" to an Entry Field using FldKey(),
- you may also move directly to a particular field whenever that hotkey is
- pressed.
-
- Please note that mouse support is automatically activated during entry form
- processing, if a mouse has been detected during initialization. If a
- hotkey has been set for a particular field, clicking the mouse on that
- field will automatically move the cursor to that field for input.
-
- After the EntShow() function returns, all fields defined with EntDef() will
- be cleared. The receiving strings of all defined fields will now contain
- the data entered. If Escape checking was on and [Esc] was pressed, then
- all receiving strings will contain the values they held before EntShow()
- was called and TcxlErr() will return W_ESCPRESS.
-
-
-
-
-
-
-
-
- Page 18 TesSeRact CXL V5.5 User's Guide
- Sometimes, you may have a need to extend or modify the data entry keys used
- by EntShow() during processing of the fields. There is a function,
- EntKey(), that enables this. What EntKey() does is defines a function to
- be used as the alternate get-key function so that during EntShow()
- processing you can get a key, test it, change it, or do whatever else you
- like with it before you return it to EntShow(). It also lets you to
- specify a variable to receive the key that caused termination of the form.
- The call to EntKey() can be contained anywhere between EntDef() and
- EntShow().
-
- Often, when dealing with database records, users would like to have [PgUp]
- mean previous record and [PgDn] mean next record. Let's also say that we
- want to use [F10] as the normal exit key instead of the currently defined
- [Ctrl-Enter]. Here is an example of an alternate get-key function would
- handle this:
-
- WrdT get_key(IntP done)
- {
- WrdT key;
-
- key=KeyGetc();
- /* if key was [F10], change it to [Ctrl-Enter] */
- if(key=0x4400)
- key=0x1c0a;
- /* if key was [PgUp] or [PgDn], set done flag on */
- if(key==0x4900 || key==0x5100)
- *done=TRUE;
-
- return(key);
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 19
-
- Using Format Control Characters
-
-
- The format control characters used by the Entry System and the Input System
- controls how each character is input and how large the input field will be.
- It consists of 1 or more format characters, and may optionally have
- displayed text in between any of the format control characters. You may
- use spaces in between the format control characters for readability of your
- code; however, these spaces will NOT be used for input. A complete list of
- valid format control characters are listed in Appendix E (case IS
- significant). All Format Control Characters are valid in both the Entry
- System and the Input System, except for command toggles.
-
- In a change from previous versions of this product, decimal points are
- returned as part of the TCXL field string, when using the '9' or '$'
- control codes. Therefore, the numeric conversion routines cvt..(), have
- been changed to account for this. There are 4 conversion functions to
- convert numbers to/from TCXL fields:
-
- cvtic()............convert integer to TCXL field string
- cvtci()............convert TCXL field string to integer
- cvtfc()............convert floating point to TCXL field string
- cvtcf()............convert TCXL field string to floating point
-
-
- To correctly use numeric fields, you must first convert your number to a
- TCXL field string with cvtic() or cvtfc(), and on return from the entry
- form, you should convert the result back to the correct type of number.
-
- Help System
-
-
- TCXL's context-sensitive help system operates on the principle of a current
- help category and a help category stack. Both require some explaining
- before you begin to use them.
-
- The current help category is the one that will be used when the user
- presses the help key. It can be set by one of several ways. The direct
- way is for you to explicitly set it by calling HlpSet(). There are also
- indirect ways that the current help category can be set. Windows, input
- fields, and menu items each have individual help categories as part of
- their record. If you were to activate a window which has its own help
- category, then that would become the current help category. During the
- processing of input fields and menus, each time you move to a new field or
- menu item item, the current help category is set to the whatever the
- field/item's help category is, even if that category is zero (empty). This
- means that input forms and menus overwrite what was in the current help
- category before the form/menu began processing.
-
-
-
-
-
-
-
-
-
- Page 20 TesSeRact CXL V5.5 User's Guide
- To keep from losing the current help category during the processing of
- forms and menus, you need to be able to save the current help category
- during that period. This is where the help stack comes into the picture.
- To save the current help category, you push it onto the stack with
- HlpCur(). When you need to retrieve it, you pop it back off of the stack
- using HlpPop(). The category popped off of the stack then becomes the
- current help category. This help stack is a LIFO (Last In First Out) stack
- and holds up to 20 help categories.
-
- When the help key is pressed (or when the HlpShow() function is called) by
- the user, TCXL's help processor will search the help file for the current
- help category. If the current help category is zero (empty), then the help
- category off top of the stack will be used. This is where the help stack
- comes in handy. It allows you to have a "background" help category for
- menu items and fields that don't have help categories of their own. Before
- processing of the form or menu, you simply push the background help
- category onto the stack.
-
- When the help category is found in the help file, the corresponding help
- text will be displayed on the screen in the help window. If there is more
- than 1 page of text, the user can change between pages via the
- [PgUp]/[PgDn] keys. If there are cross-reference items, the user can use
- the arrow keys to move between them, and use [Enter] to select. Pressing
- [Esc] will exit the help window.
-
- During help processing, all keys attached to functions via KbndSet() will
- be disabled to avoid conflict with the help system. If you wish to have
- defined keys available during help processing, you can define themusing
- KbndSet() in the "open" function specified in the HelpDef() function. If
- you define any keys in the "open" function, you will not need to worry
- about freeing them as the help processor will free any user-defined keys
- before exiting help.
-
- The size and placement of the help window are adjustable. The help window
- size by default is 19 rows by 64 columns centered on the screen. This can
- be changed using HlpWind(). The HelpWind() function sets the screen
- coordinates to be used when opening the help window and can be called any
- time after HelpDef(). If you ever want to disengage the help system, just
- call HlpOff().
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 21
- Building Help Files
-
-
- Creating help files is quite easy. You need to have an ASCII editor to
- create them with. You should have your editor set to expand tab characters
- to spaces. Your help file can contain several help categories. Here is an
- example of a couple of defined help categories:
-
- *B 1,Help Category 1
- help text help text help text
- help text help text help text
- help text help text help text
- *P
- help text help text help text
- help text help text help text
- help text help text help text
- *E
-
- *B 2,Help Category 2
- help text help text help text
- help text help text help text
- help text help text help text
- *P
- help text help text help text
- help text help text help text
- help text help text help text
- Also see: ^Help Category 1^
- *E
-
-
- The "*B" indicator specifies the beginning of a help category. The format
- is "*B helpcatnumber[,helpcatname]". The help category number is the
- number of the help category that you set using HlpSet(). There should be
- only one space between the "*B" and the help category number. The help
- category name is only required for cross-references. If there are no
- cross-references to that help category, then you can leave the helpcatname
- parameter out.
-
- The "*P" indicator specifies a page break and is optional. You may have as
- many page breaks as you'd like. The "*E" indicator specifies the end of the
- help category. The "*B", "*P", and "*E" indicators must all begin in the
- first column. These indicators and the help category name are case
- insensitive (can be in lowercase, uppercase, or mixed).
-
- TCXL represents help categories as integers. When assigning help category
- numbers in the help file, you should start at 1 and go up from there. Help
- category 0 is reserved to represent an empty help category.
-
- In the definition of Help Category 2, you will notice the cross-reference
- to Help Category 1. All cross-referencing is done by embedding the cross-
- reference category name (not number) inside carats (^). If you need to
- display a carat inside the help file, use a double carat (^^).
-
-
-
-
-
-
- Page 22 TesSeRact CXL V5.5 User's Guide
- Any text contained outside of the "*B" and "*E" will be treated as
- comments. If an "*E" is not found, then the end-of-file will be treated as
- an "*E".
-
- Now, you need to "compile" your ASCII help file into an indexed file. There
- is utility, MAKHLP.COM, which takes your ASCII help file as input, and
- outputs an indexed version of of the same file. This new file is the
- actual help file that you specify in the HelpDef() function. Keep the
- ASCII help file around so you will be able to make modifications.
-
- Selection System
-
-
- TCXL's Selection System is a powerful tool to help users select
- information. SelFile(), SelStr() and SelTxt() all use the same low-level
- input routine, _Select(). SelAttr() is provided not only because of its
- obvious usefulness, but as an example of what can be accomplished using
- TCXL.
-
- To use the Selection System, you just need to call the appropriate routine.
- To select a file, for example, call SelFile(), specifying the size of the
- window to use, etc. Upon return, the pathname of the file you were
- attempting to select will be waiting!
-
- Although the structures and variables in the Selection System are internal
- only, two global variables, SelPtr and SelNdx, (See Page (?)) are provided
- to allow users access to the currently-highlighted item. This would
- normally be used in a function bound to a special key that needed to know
- what item is currently selected.
-
- Please note that mouse support is automatically activated during entry form
- processing, if a mouse has been detected during initialization. This means
- you can select an item with your mouse, and you can also scroll the window
- using the provided scroll bars.
-
- Window System
-
-
- The Window System is the "heart" of the TCXL package. It is the largest of
- all the systems, and also the most varied. Functions are provided for
- window shapes, sizes, locations, appearances, and for text output.
-
- Using the Window System is simple. Call Wopen() to open a window. Use the
- Wput..() and Wprt..() functions for output. Use the Wset..() functions for
- setting control information.
-
- Wopen() returns a Window Handle, which is used by many of the functions in
- TCXL to determine which window to affect. Most of the output functions are
- designed to write to the active window, which is the window on "top".
-
- While TCXL provides limited functionality for writing to hidden or inactive
- windows (see the Wwprints() (function, this is really not in the design of
- this package. With TCXL 6.0, we will have full virtual windows.
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 23
-
- Display System
-
-
- The display system is designed to be used for output to the video display
- that is NOT window-oriented. It is separated from the physical display,
- and it is also used by the Window System and the User Level systems.
-
- Your most common use of the Display System will most likely be accessing
- the cursor position, or calling Vsave() and Vrestore(). For most purposes,
- the Window System should be sufficient.
-
- Input System
-
-
- The Input System is designed to provide a consistent interface between the
- keyboard/mouse and the display/window. By calling the functions in this
- section, keys are correctly translated, echoed to the appropriate location
- on the window and/or display, and buffered appropriately. Using the Line
- Input routines (KvFmtGet() and KwFmtGet()) is similar to using the Entry
- System. Some additional Format Control Characters are available; see
- Appendix E for details.
-
- Strings System
-
-
- The Strings System supplements and augments the string-handling
- capabilities of your compiler's run-time library. Use it in good health.
-
- Information Subsystem
-
-
- The Information Subsystem is the low-level "backbone" of the library. This
- contains the TcxlInit() and TcxlTerm() functions, as well as a series of
- informational routines such as SysTime(), _Delay(), etc. While most of the
- functions are for internal use by the TCXL library itself, you might find
- some of these functions handy for general use.
-
- Memory Subsystem
-
-
- The Memory Subsystem is implemented to mirror useful functions in the EMS
- (Expanded Memory Specification) and XMS (eXtended Memory Specification)
- currently in use by thousands of products on the market today. WARNING!!!!
- Do not attempt to use these functions without a good knowledge of the EMS
- and XMS specifications. They are very low-level, and could have
- disasterous effects if you do not correctly use them.
-
- This system also implements detection for the Dos Protected Mode Interface
- (DPMI) and Virtual Control Program Interface (VCPI) specifications, in use
- currently by 386 control programs and multitaskers such as Windows 3.0 and
- DESQView. While no control functions are currently available to manipulate
- memory using these interfaces, the auto-detection is enabled.
-
-
-
-
-
- Page 24 TesSeRact CXL V5.5 User's Guide
- While it is possible to access VCPI while DPMI and Windows 3.0 is active,
- we have disabled that auto-check from the MemInit() function. Windows 3.0
- is shipped with the "VCPIWarning" parameter set to "TRUE", which would
- cause a program to crash if started under Windows 3.0.
-
- While it is possible to have VCPIWarning set to FALSE, and have programs
- access VCPI under Windows 3.0, we felt it unnecessary to have that a
- requirement for TCXL programs at this time.
-
- To get a copy of the various specification documentation, please contact:
-
- DPMI Spec....Version 0.9, May 15, 1990
- Intel Literature JP26, 1-800-548-4725, Part Number 240763-001
-
- VCPI Spec....Version 1.0, June 12, 1989
- Phar Lap Software, Inc, 1-617-661-1510
-
- XMS Spec.....Version 2.0, August 23, 1988
- Microsoft Customer Service, 1-800-426-9400
-
- EMS Spec.....Version 4.0, August 1987
- Intel Literature JP26, 1-800-548-4725, Part Number 300275-004
-
- Printer Subsystem
-
-
- The Printer Subsystem gives you a minimum level of support for printers.
- In addition to providing equates for standard Epson-compatible printer
- codes, these functions also provide string output routines to the "StdPrn"
- device.
-
- OpSys Subsystem
-
-
- This is a "catch-all" subsystem, with operating-system specific routines,
- as well as hardware-level routines. Most compiler's provide similar
- functionality for these routines, but for portability, we added them here
- in a standard format. Feel free to use them as needed.
-
- Video Access Subsystem
-
-
- This is the "guts" of the TCXL Display System. These routines directly
- display characters and attributes on the video display. Each routine
- determines whether BIOS writes have been enabled, snow checking is on, and
- whether shadow-buffer updates are necessary.
-
- Because these are the ONLY routines necessary for displaying output, a
- simple modification of these routines is all that is necessary to support
- an alternate video system.
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 25
- The Video Access System also contains the necessary functions to support
- UltraVision. Ultravision is a software product that lets you unlock the
- hidden capabilities in your EGA or VGA card. UV gives you a set of more
- than 20 different fonts to use, in higher resolutions, and with more
- control over screen sizes. With UV in your system and a multi-frequency
- monitor, you can choose screen sizes such as 80x60, 108x34, or 132x50!
- Ultravision also has a built-in screen accelerator, color palette locking,
- and a lot more features. Contact Personics at 1-800-445-3311 or 1-508-897-
- 1575 for more details.
-
- Keyboard Access Subsystem
- Mouse Access Subsystem
-
-
- The Keyboard Access Subsystem, together with the Mouse Access Subsystem,
- make up the low-level code for input from the keyboard and mouse. Like the
- Video Access Subsystem, these routines make up all the low-level code
- necessary for accessing these devices. Extending or replacing these
- systems are all that is necessary to support additional or alternative
- input devices. If you are unfamiliary with how to use the provided mouse
- functions, we recommend you call Microsoft and order their Mouse
- Programmer's Reference Guide (or see if your local bookstore carries it).
- This is the definitive answer to how to use the mouse correctly. We could
- not even begin to describe the features and caveats of the Microsoft Mouse
- interface in these documents.
-
- Conversion Subsystem
- Format Control Subsystem
- Near/Far Subsystem
-
-
- These three subsystems are used internally by TCXL, and are not designed
- for use access, with the main exception of the cvt..() functions, which are
- described in a previous section.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 26 TesSeRact CXL V5.5 User's Guide
- Header File Descriptions
-
- C Header Files
-
- <TCXLdef.h> : Miscellaneous function prototypes and definitions. This
- file is also included by all other <TCXLxxx.h> header files
- and so user programs normally need not include this file.
- <TCXL_tc.h : Compiler specific definitions for Turbo C/C++
- <TCXL_msc.h> : Compiler specific definitions for Microsoft C
- <TCXL_ztc.h> : Compiler specific definitions for Zorctech C/C++
- <TCXLerr.h> : Global error equates
- <TCXLmnu.h> : Menu System declarations and prototypes
- <TCXLent.h> : Entry System declarations and prototypes
- <TCXLhlp.h> : Help System declarations and prototypes
- <TCXLsel.h> : Selection System declarations and prototypes
- <TCXLwin.h> : Window System declarations and prototypes
- <TCXLvid.h> : Display System and Video Access Subsystem declarations
- and prototypes
- <TCXLkey.h> : Input System and Keyboard Access Subsystem declarations
- and prototypes
- <TCXLcod.h> : Equates for Keyboard Codes
- <TCXLstr.h> : Strings System declarations and prototypes
- <TCXLhdw.h> : Information Subystem declarations and prototypes
- <TCXLmem.h> : Memory Subsystem declarations and prototypes
- <TCXLprn.h> : Printer Subsystem declarations and prototypes
- <TCXLdos.h> : OpSys Subsystem declarations and prototypes
- <TCXLvid.h> : Display System and Video Access Subsystem declarations
- and prototypes
- <TCXLatr.h> : Video attribute equates
- <TCXLkey.h> : Input System and Keyboard Access Subsystem declarations
- and prototypes
- <TCXLmou.h> : Mouse Access Subsystem declarations and prototypes
- <TCXLcvt.h> : Conversion Subsystem declarations and prototypes
- <TCXLfmt.h> : Format Control Subsystem declarations and prototypes
- <TCXLfar.h> : Near/Far Subsystem declarations and prototypes
-
- <_TCXLhlp.h> : Internal Shorthand equates
- <_TCXLent.h>
- <_TCXLmnu.h>
- <_TCXLvid.h>
- <_TCXLwin.h>
-
-
- Assembler Include Files
-
- <TCXLASM.MAC> : Internal assembler macro file.
- <TCXLKEY.INC> : ASM analogue of <TCXLkey.h>.
- <TCXLMOU.INC> : ASM analogue of <TCXLmou.h>.
- <TCXLVID.INC> : ASM analogue of <TCXLvid.h>.
- <TCXLMEM.INC> : ASM analogue of <TCXLmem.h>
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 27
- Predefined Types
-
- Once you master the strong typing used by the TCXL routines, reading the
- code should be very simple. However, because the code has been designed
- for maximum portability, the C code must rely heavily on the pre-processor
- to handle all the differents between compilers and operating environments.
-
- Therefore, we strongly urge you to study typing and naming conventions
- described below. Once you get the hang of it, it will become simple.
-
-
- Portability and Shorthand Notation
-
- /* compiler dependent; see TCXL_???.H for specific */
- /* declarations */
- #define CDC cdecl
- #define PAS pascal
- #define FAR far
- #define NEAR near
-
-
- #define CON const /* shorthand notation */
- #define CTYP PAS /* for standard typing */
- #define GBL extern
- #define LCL static
- #define REG register
- #define SIZ(c) sizeof(c)
- #define TYP typedef
- #define UNS unsigned
- #define VOID void
- #define VOL volatile
-
-
- #ifdef __cplusplus
- # define NOARG /* remove C cruft for C++ */
- #else
- # define NOARG void /* leave C cruft for C */
- #endif
-
- #ifdef EOS
- # undef EOS
- #endif
- #define EOS '\x00' /* End_Of_String */
-
- #ifdef NUL
- # undef NUL /* NulTerm */
- #endif
- #define NUL EOS /* ASCII NULl char */
-
- #define BEL '\x07' /* Common control codes */
- #define BS '\x08'
- #define HT '\x09'
- #define LF '\x0A'
- #define FF '\x0C'
- #define CR '\x0D'
- #define ESC '\x1B'
-
-
- Page 28 TesSeRact CXL V5.5 User's Guide
- #ifdef EOF
- # undef EOF
- #endif
- #define EOF (-1) /* End_Of_File */
- #define CpmEof '\x1A' /* CP/M-style [PDP-8!] ^Z EOF */
- #define CtlZ CpmEof /* ... alias */
-
- #ifdef FALSE
- # undef FALSE
- #endif
- #ifdef TRUE
- # undef TRUE
- #endif
- #define FALSE 0 /* Boolean absolutes */
- #define TRUE 1
- #define YES TRUE /* ... aliases */
- #define NO FALSE
- #define ON TRUE
- #define OFF FALSE
-
- /* Error return values */
- #define ERR_MEM (-2) /* Allocation failure */
- #define ERR_ARG (-1) /* argument failure */
- #define ERR_NUL 0 /* successful return */
-
-
- Standard Object, Pointer and Indirect Types
-
- TYP VOID *AnyP, **AnyI; /* anonymous pointer */
- TYP VOID FAR *AnyFP; /* ... far-pointer */
- TYP char ChrT, *ChrP, **ChrI; /* 8-bit char */
- TYP ChrT FAR *ChrFP; /* ... far-pointer */
- TYP ChrT *StrP, **StrI; /* NulTerm string */
- TYP UNS char BytT, *BytP, **BytI; /* 8-bit unsigned byte*/
- TYP BytT FAR *BytFP; /* ... far-pointer */
- TYP BytT FlgT, *FlgP, **FlgI; /* 8-bit Boolean flag */
- TYP short IntT, *IntP, **IntI; /* 16-bit signed int */
- TYP IntT FAR *IntFP; /* ... far-pointer */
- TYP UNS short WrdT, *WrdP, **WrdI; /*16-bit unsigned word*/
- TYP WrdT FAR *WrdFP; /* ... far-pointer */
- TYP long LngT, *LngP, **LngI; /* 32-bit signed long */
- TYP LngT FAR *LngFP; /* ... far-pointer */
- TYP UNS long DwdT, *DwdP, **DwdI; /*32-bit unsigned dwrd*/
- TYP DwdT FAR *DwdFP; /* ... far-pointer */
- TYP float FltT, *FltP, **FltI; /* 32-bit real */
- TYP double DblT, *DblP, **DblI; /* 64-bit real */
- TYP WrdT LenT, *LenP, **LenI; /* alias for size_t */
- TYP LngT PosT, *PosP, **PosI; /* alias for fpos_t */
- TYP WrdT NdxT, *NdxP, **NdxI; /* array-indices */
- TYP IntT ArgT; /* bytes as ints */
- TYP WrdT KeyT; /* ASCII/Scan Code */
- /* ..returned by BIOS */
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 29
- TCXL-specific type-aliases
-
- TYP BytT AtrT, *AtrP; /* video attribute */
- TYP WrdT KeyT, *KeyP; /* keycode (char/scan) */
- TYP IntT TagT, *TagP; /* item/field/help tag */
- TYP IntT WndT, *WndP; /* window handle */
-
-
-
-
- Common Function Pointer Types
-
- TYP VOID (CTYP *VfvCP)(NOARG); /* VOID (*function)(NOARG) */
- TYP VOID (CTYP *VfiCP)(IntT); /* VOID (*function)(IntT) */
- TYP IntT (CTYP *IfcpCP)(ChrP); /* IntT (*function)(ChrP) */
- TYP WrdT (CTYP *WfipCP)(IntP); /* WrdT (*function)(IntP) */
-
-
-
- Structures, Unions and Typedefs
-
- TCXL uses a simple naming convention for all structures and typedefs. If,
- for example a structure is defined as "struct Kcod", it would be typedef'd
- as "KcodT", and a a pointer to an object would be "KcodP". As an example,
- see the following code fragment:
-
- #include <TCXLkey.h>
-
- union Kcod KbdCode; /* keycode union declaration */
- KcodT KbdCode1; /* Identical declaration using typedef */
- KcodP KbdPtr; /* pointer to keycode type */
-
- ...
-
- KbdPtr = &KbdCode; /* Assign pointer to union */
- KbdPtr = &KbdCode1; /* same thing */
-
-
- We are aware, however, that there is a tendency for C programmers to resist
- change. With the coming of C++, the success of strongly-typed languages
- like Pascal, and the advent of multiple operating platforms, it is
- necessary for the modern programmer to write readable, portable, consistent
- code.
-
- If, however, you prefer to use "char *" instead of "ChrP" in your function
- declarations, your compiler won't complain. So go ahead.
-
- We have found, however, that after about a week, you won't want to go back.
-
-
-
-
-
-
-
-
-
-
- Page 30 TesSeRact CXL V5.5 User's Guide
- ---------------------------------------------------------------------------
-
- Menu System
-
-
- ---------------------------------------------------------------------------
-
- NAME.........Mctl
-
- DESCRIPTION
- This is the menu control structure. Through the global variable
- _MnuCtl (Page 47), TCXL uses this structure for access to the
- menuing features.
-
- DECLARATION
- struct Mctl /* Menu-control object */
- {
- MdfP mtop; /* top menu */
- MdfP mcur; /* current menu */
- IntT mmnu; /* current menu level */
- IntT mitm; /* item level */
- }
-
- TYP struct Mctl MctlT;
-
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 31
- NAME.........Idf
-
- DESCRIPTION
- This is the Item Definition structure for individual menu items.
- This is used internally by the TCXL routines.
-
- DECLARATION
- struct Idf /* Menu-item object */
- {
- IdfP iprv; /* previous Item object */
- IdfP inxt; /* next Item object */
- MdfP isub; /* submenu Menu object */
- ChrP istr; /* selection string */
- ChrP itxt; /* text description */
- VfvCP isel; /* selection function */
- VfvCP ibef; /* "before" function */
- VfvCP iaft; /* "after" function */
- KeyT ikey; /* hot key */
- TagT itag; /* tag ID */
- TagT ihlp; /* help tag */
- VposT ispo; /* select text position */
- VposT idpo; /* description position */
- AtrT idat; /* description attribute */
- BytT ichr; /* quick select char */
- BytT imsk; /* feature mask */
- BytT ilen; /* selection-text length */
- VposT icpo; /* center position */
- };
-
- TYP struct Idf IdfT, *IdfP;
-
-
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 32 TesSeRact CXL V5.5 User's Guide
- NAME.........Mdf
-
- DESCRIPTION
- This is the menu definition structure, used internally by the
- library routines for menu handling.
-
- DECLARATION
- struct Mdf /* Menu object */
- {
- MdfP mprv; /* previous menu object */
- MdfP mnxt; /* next menu object */
- MdfP mpar; /* parent menu object */
- IdfP mtop; /* head menu item */
- IdfP mcur; /* current menu item */
- VfvCP mopn; /* post-opening function */
- TagT mtag; /* selected tag ID */
- VposT mbeg; /* start position */
- VposT mend; /* end position */
- BoxT mbox; /* border type */
- AtrT mwat; /* window attribute */
- BytT mtyp; /* type mask */
- BytT mwid; /* width of menu bar */
- BytT mofs; /* text offset */
- AtrT mtat; /* text attribute */
- AtrT msat; /* selection char attribute */
- AtrT mnat; /* non-selectable attribute */
- AtrT mbat; /* selection bar attribute */
- };
-
- TYP struct Mdf MdfT, *MdfP;
-
-
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 33
-
- Entry System
-
-
- ---------------------------------------------------------------------------
-
- NAME.........Fdf
-
- DESCRIPTION
- This is the structure for an individual entry field.
-
- DECLARATION
- struct Fdf /* field-definition object */
- {
- FdfP fprv; /* previous Fdft */
- FdfP fnxt; /* next Fdft */
- ChrP fstr; /* receiving string */
- ChrP fbfr; /* temp receive string */
- ChrP ffmt; /* input format string */
- IfcpCP fval; /* validation function */
- VfvCP fbef; /* "before" function */
- VfvCP faft; /* "after" function */
- KeyT fkey; /* hot-key */
- WrdT fmsk; /* feature mask */
- IntT ftag; /* tag ID */
- IntT fhlp; /* help category */
- VposT fpos; /* Input position */
- BytT fctl; /* control flags */
- BytT flen; /* length of buffer */
- BytT fdec; /* decimal position */
- BytT ffut; /* reserved for future */
- };
-
- TYP struct Fdf FdfT, *FdfP;
-
-
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 34 TesSeRact CXL V5.5 User's Guide
- NAME.........Edf
-
- DESCRIPTION
- This is the internal structure for an entry form.
-
- DECLARATION
- struct Edf /* Entry-definition object */
- {
- FdfP etop; /* head FdfT */
- FdfP efld; /* current FdfT */
- WfipCP eget; /* alternate get function */
- WrdP etrm; /* terminating key pointer */
- ChrP efmt; /* format string */
- ChrP ebfr; /* buffer string */
- ChrP ebas; /* buffer base */
- ChrP esep; /* valid word separators */
- VposT epos; /* window position */
- BytT elen; /* buffer-length */
- BytT edec; /* decimal position */
- BytT ectl; /* field control flags */
- AtrT efat; /* field attribute */
- BytT etat; /* text attribute */
- BytT efut; /* reserved for future */
- };
-
- TYP struct Edf, EdfT, *EdfP;
-
-
- ---------------------------------------------------------------------------
-
- Help System
-
-
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 35
- NAME.........Hctl
-
- DESCRIPTION
- This is the control structure for the help system. It is used
- internally by the TCXL routines. Please note that since the Help
- Stack is declared as a #define, and the stack itself is global
- buffer, a simple recompile will allow the programmer to change the
- size of the help stack.
-
- DECLARATION
- struct Hctl /* Help-info object */
- {
- TagT hstk[HLP_STK]; /* help stack */
- ChrP hfil; /* help file name */
- VfvCP hopn; /* open function */
- IntT hptr; /* help stack pointer */
- KeyT hkey; /* help hot key */
- AtrT hwat; /* window attribute */
- AtrT htat; /* text attribute */
- AtrT hsat; /* selection attribute */
- AtrT hbat; /* bar attribute */
- VposT hbeg; /* window start position */
- VposT hend; /* window end position */
- BytT hbox; /* window border type */
- BytT hflg; /* display "Help" title? */
- };
-
- TYP struct Hctl HctlT, *HctlP;
-
-
- ---------------------------------------------------------------------------
-
- Window System
-
-
- ---------------------------------------------------------------------------
-
- NAME.........Box
-
- DESCRIPTION
- This is the object that describes a window's box (Border), or
- frame.
-
- DECLARATION
- struct Box /* Window frame object */
- {
- BytT btyp; /* box type */
- AtrT batr; /* attribute */
- }
-
- TYP struct Box BoxT, *BoxP;
-
-
-
-
-
-
-
- Page 36 TesSeRact CXL V5.5 User's Guide
- ---------------------------------------------------------------------------
-
- NAME.........Ttl
-
- DESCRIPTION
- This is the object that describes a window's title.
-
- DECLARATION
- struct Ttl /* Window-title object */
- {
- ChrP tstr; /* string */
- BytT tpos; /* position */
- AtrT tatr; /* attribute */
- };
-
- TYP struct Ttl TtlT, *TtlP;
-
- ---------------------------------------------------------------------------
-
- NAME.........Wdf
-
- DESCRIPTION
- This is the structure for each individual window created with TCXL.
-
- DECLARATION
- struct Wdf /* Window-definition object */
- {
- WdfP wprv; /* previous WdfT */
- WdfP wnxt; /* next WdfT */
- VCelP wbfr; /* buffer */
- VCelP wsbf; /* shadow buffer */
- TtlT wttl; /* title */
- WndT whdl; /* handle */
- TagT whlp; /* help category */
- VposT wbeg; /* start position */
- VposT wend; /* end position */
- VposT wpos; /* cursor position */
- BoxT wfrm; /* border */
- AtrT wdat; /* default attribute */
- AtrT wcat; /* current attribute */
- AtrT wsat; /* shadow attribute */
- BytT wbrd; /* border ? 1 : 0 */
- };
-
- TYP struct Wdf WdfT, *WdfP;
-
-
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 37
- NAME.........Wctl
-
- DESCRIPTION
- This is the global window-controlling structure for the TCXL
- system.
-
- DECLARATION
- struct Wctl /* Window-control object */
- {
- Wdfp wact; /* active window */
- WdfP whid; /* head hidden window */
-
- /* fill-function */
- VOID (CTYP *wfun)(VposT, VposT, IntT, IntT);
-
- WndT whdl; /* last handle assigned */
- TagT whlp; /* current help category */
- IntT werr; /* last error num */
- IntT wopn; /* total open windows */
- BytT wesc; /* check for Esc in input? */
- BytT wtab; /* TTY output tab width */
- BytT wfil; /* fill character */
- BytT wflg; /* reserved flag byte */
- };
-
- TYP struct Wctl WctlT, *WctlP;
-
-
- ---------------------------------------------------------------------------
-
- Information Subsystem
-
-
- ---------------------------------------------------------------------------
-
- NAME.........Hdw
-
- DESCRIPTION
- This structure is designed to hold information about the hardware
- used by the individual machine. It is not totally reliable, but it
- does use the BIOS services to gather the information.
-
- DECLARATION
- struct Hdw /* Hardware-data object */
- {
- BytT hpar; /* parallel-ports */
- BytT Hser; /* serial-ports */
- BytT Hdrv; /* floppy-drives */
- BytT Hflg; /* option-flags */
- };
- TYP struct Hdw HdwT, *HdwP;
-
-
-
-
-
-
-
- Page 38 TesSeRact CXL V5.5 User's Guide
- ---------------------------------------------------------------------------
-
- NAME.........Tcxl
-
- DESCRIPTION
- This is the global TCXL control object. It contains global error
- and configuration information about the operating environment.
-
- DECLARATION
- struct Tcxl /* TCXL-control object */
- {
- IntT terr; /* error code */
- IntT tdbg; /* debug-level */
- WrdT tsys; /* operating system */
- WrdT tenv; /* environment bits */
- WrdT tcfg; /* configuration bits */
- };
-
- TYP struct Tcxl TcxlT, *TcxlP;
-
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 39
-
- Memory Subsystem
-
-
- ---------------------------------------------------------------------------
-
- NAME........._Mem
-
- DESCRIPTION
- This is the control block and information header for the Memory
- Subsystem.
-
- DECLARATION
- struct _Mem /* Memory-control object */
- {
- BytT mMflg /* Memory flags */
- BytT mDpro; /* DPMI Processor */
- WrdT mDflg; /* DPMI Flags */
- DwdT mDent; /* DPMI entry point */
- WrdT mDver; /* DPMI version */
- WrdT mVver; /* VCPI Version */
- WrdT mEseg; /* EMS Base Segment */
- WrdT mEver; /* EMS Version */
- WrdT mEfre; /* EMS Free (16kb page) */
- WrdT mEtot; /* EMS Total (16kb page) */
- BytT mEerr; /* EMS Error Code */
- BytT mXerr; /* XMS Error Code */
- WrdT mXver; /* XMS Version */
- DwdT mXent; /* XMS Entry Point */
- WrdT mXint; /* XMS Internal Version */
- WrdT mHfre; /* HMA free (para) */
- WrdT mXtot; /* XMS total free (1k) */
- WrdT mXlrg; /* XMS largest free (1k) */
- WrdT mUfre; /* Largest available UMB */
- };
-
- TYP struct _Mem _MemT;
-
-
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 40 TesSeRact CXL V5.5 User's Guide
-
- OpSys Subsystem
-
-
- ---------------------------------------------------------------------------
-
- NAME.........Ffb
-
- DESCRIPTION
- This is the DOS DTA structure, used by the FindFirst/FindNext
- functions.
-
- DECLARATION
-
- struct Ffb /* findfirst/findnext DTA */
- {
- BytT fdos[21];
- BytT fatr;
- WrdT ftim;
- WrdT fdat;
- LngT fsiz;
- ChrT fnam[13];
- };
-
- TYP struct Ffb FfbT, *FfbP;
-
-
- ---------------------------------------------------------------------------
-
- Video Access Subsystem
-
-
- ---------------------------------------------------------------------------
-
- NAME.........Vcel
-
- DESCRIPTION
- This is the structure for a video "cell", i.e., the
- character/attribute pair that controls what you see and what
- attributes it has.
-
- DECLARATION
- union Vcel /* Video cell */
- {
- WrdT cwrd; /* overlay word */
- struct
- {
- ChrT chr; /* character */
- BytT atr; /* attribute */
- } c;
- };
-
- TYP union Vcel VcelT, *VcelP;
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 41
- ---------------------------------------------------------------------------
-
- NAME.........Vcse
-
- DESCRIPTION
- This is the structure that stores the state of the video cursor.
-
- DECLARATION
- union Vcse /* Video cursor */
- {
- WrdT cwrd; /* overlay word */
- struct
- {
- BytT end; /* stop line */
- BytT beg; /* start line */
- } c;
- };
-
- TYP union Vcse VcseT, *VcseP;
-
-
- ---------------------------------------------------------------------------
-
- NAME.........Vpos
-
- DESCRIPTION
- This is the structure that holds the current cursor position on the
- video display.
-
- DECLARATION
- union Vpos /* Video position */
- {
- WrdT pwrd; /* overlay word */
- struct
- {
- BytT col; /* column */
- BytT row; /* row */
- } p;
- };
-
- TYP union Vpos VposT, *VposP;
-
-
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 42 TesSeRact CXL V5.5 User's Guide
- NAME.........Vctl
-
- DESCRIPTION
- This is the video control structure. It is used to interface
- between the window system and the physical layout of the video
- hardware.
-
- DECLARATION
- struct Vctl /* video-control object */
- { WrdT vseg; /* video buffer segment */
- BytT vhdw; /* video adapter type */
- BytT vflg; /* video flag byte */
- BytT vpag; /* display-page */
- IntT vwid; /* columns wide */
- IntT vdep; /* rows deep */
- VcseT vcur; /* cusor-save */
- BytT vuvf; /* Ultravision Flags */
- BytT vuvc; /* Ultravision Card Code */
- BytT vuvm; /* Ultravision Text Mode */
- BytT vfut; /* Reserved for future use */
- };
-
- TYP struct Vctl VctlT, *VctlP;
-
-
- ---------------------------------------------------------------------------
-
- Keyboard Access Subsystem
-
-
- ---------------------------------------------------------------------------
-
- NAME.........Kcod
-
- DESCRIPTION
- This is a union that holds the complete keyboard ASCII/ScanCode
- pair, as returned by the BIOS and placed into the machine's
- keyboard buffer.
-
-
- DECLARATION
- union Kcod /* complete keycode */
- {
- KeyT ckey; /* word overlay */
- struct
- {
- BytT asc; /* ASCII */
- BytT scn; /* Scan Code */
- } c;
- };
-
- TYP union Kcod KcodT, *KcodP;
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 43
- ---------------------------------------------------------------------------
-
- NAME.........Kbnd
-
- DESCRIPTION
- This structure is used internally to translate keystrokes, or to
- execute a function when a particular key is pressed. It is
- implemented as a double-linked list of structures.
-
- DECLARATION
- struct Kbnd /* Key-binding object */
- {
- KbndP bprv; /* previous */
- KbndP bnxt; /* next */
- VfvCP bfun; /* bound function */
- KeyT bkey; /* trap keycode */
- KeyT brtn; /* return keycode */
- };
-
- TYP struct Kbnd KbndT, *KbndP;
-
-
- ---------------------------------------------------------------------------
-
- NAME.........Kctl
-
- DESCRIPTION
- This structure is the Keyboard Control structure. All keyboard
- operations are controlled by this, referenced through the global
- variable _KeyCtl. The internal keyboard "queue" is implemented as
- a ring buffer, and also controlled within this structure.
-
- DECLARATION
- struct Kctl /* key-control object */
- {
- BytT kflg; /* control-flag */
- BytT ksrc; /* keycode */
- IntT kbeg; /* key-queue head */
- IntT kend; /* key-queue tail */
- IntT kcnt; /* key-queue count */
- IntT kmax; /* key-queue size */
- KeyP kbas; /* key-queue base */
- KbndP kbnd; /* key-binding */
- VfvCP kidl; /* idle-loop function */
- KeyT khlp; /* help keycode */
- VfvCP kfun; /* help function */
- }
-
- TYP struct Kctl KctlT, *KctlP;
-
-
-
-
-
-
-
-
-
- Page 44 TesSeRact CXL V5.5 User's Guide
- ---------------------------------------------------------------------------
-
- Mouse Access Subsystem
-
-
- ---------------------------------------------------------------------------
-
- NAME.........Mou
-
- DESCRIPTION
- This is the mouse control block, accessed through the global
- variable _MouCtl.
-
- DECLARATION
- struct Mou /* mouse-control object */
- { /* 16-level mouse stack */
- BytT mlvl; /* Head support-level */
- BytT mcol; /* Head support-level */
- BytT mrow; /* Head support-level */
- BytT mstk[45]; /* rest of stack */
- BytT mflg; /* current control-flags */
- BytT mbtn; /* last button-status */
- IntT mcnt; /* last button-count */
- IntT mhor; /* last horiz. motion */
- IntT mver; /* last vert. motion */
- KeyT mlkc; /* left-button keycode */
- KeyT mrkc; /* right-button keycode */
- KeyT mmkc; /* middle-button keycode */
- WrdT mfut; /* reserved for future */
- };
-
- TYP struct Mou MouT, *MouP;
-
-
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 45
-
- Format Control Subsystem
-
-
- ---------------------------------------------------------------------------
-
- NAME.........Fmt
-
- DESCRIPTION
- This is the global structure controlling input format control for
- the TCXL system.
-
- DECLARATION
- struct Fmt /* Format-control object */
- { ChrP ftgl; /* option toggle string */
- ChrP fchr; /* control char string */
- VfiCP fput; /* backspace function */
- BytT flen; /* input field length */
- BytT fdec; /* decimal position */
- BytT fopt; /* option state */
- BytT fuse; /* usage state */
- ChrT fpfx; /* currency-prefix char */
- ChrT fsep; /* currency seperator */
- ChrT fsfx; /* currency-suffix char */
- BytT ffut[3]; /* reserved for future */
- };
- TYP struct Fmt FmtT;
-
- ---------------------------------------------------------------------------
-
-
- Control Structures and Macros
-
- These global control structures are described here for information purposes
- only. Directly modifying members of these structures could be very
- dangerous for application programs, as they are internally maintained by
- the TCXL library functions.
-
- If you find the need within your application to read the values associated
- with the structures described here and in the previous chapter, please use
- the described macros; in future releases, these macros will be retained,
- even if the structure definitions change.
-
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 46 TesSeRact CXL V5.5 User's Guide
- Menu System
-
-
- ---------------------------------------------------------------------------
-
- NAME........._MnuCtl
-
- DESCRIPTION
- This global variable is used to maintain the menu system built by
- TCXL functions.
-
- DECLARATION
- GBL MctlT CDC _MnuCtl
-
- EQUATES
- /* Menu Feature Masks */
- #define ITM_PUL 0x01 /* has pull-down menu attached */
- #define ITM_NSL 0x02 /* not selectable */
- #define ITM_AFT 0x04 /* close after select func */
- #define ITM_ALL 0x08 /* close all when selected */
- #define ITM_BEF 0x10 /* close before select func */
- #define ITM_DSP 0x20 /* redisplay */
-
- /* Menu Types */
- #define MNU_HOR 0x01 /* horizontal menu */
- #define MNU_VER 0x02 /* vertical menu */
- #define MNU_OMN 0x07 /* omnidirectional menu */
- #define MNU_PUL 0x08 /* pull-down menu */
- #define MNU_NQS 0x10 /* disable quick selection */
- #define MNU_SAV 0x20 /* save last bar position */
- #define MNU_DSP 0x40 /* always display */
- #define MNU_USE 0x80 /* use current window /
-
- ACCESS MACROS
- #define MctlTop (_MnuCtl.mtop) /* top menu */
- #define MctlCur (_MnuCtl.mcur) /* current menu */
- #define MctlMnu (_MnuCtl.mmnu) /* menu level */
- #define MctlItm (_MnuCtl.mitm) /* item level */
-
- OTHER RELATED MACROS
- #define MdfPrv(m) ((m)->mprv) /* previous MdfT */
- #define MdfNxt(m) ((m)->mnxt) /* next MdfT */
- #define MdfPar(m) ((m)->mpar) /* parent MdfT */
- #define MdfTop(m) ((m)->mtop) /* head IdfT */
- #define MdfCur(m) ((m)->mcur) /* current IdfT */
- #define MdfOpn(m) ((m)->mopn) /* post-open func */
- #define MdfTag(m) ((m)->mtag) /* selected tag ID */
- #define MdfBeg(m) ((m)->mbeg) /* start position */
- #define MdfBegW(m) (VposW(MdfBeg(m))) /* word */
- #define MdfBegC(m) (VposC(MdfBeg(m))) /* col */
- #define MdfBegR(m) (VposR(MdfBeg(m))) /* row */
- #define MdfEnd(m) ((m)->mend) /* end position */
- #define MdfEndW(m) (VposW(MdfEnd(m))) /* word */
- #define MdfEndC(m) (VposC(MdfEnd(m))) /* col */
- #define MdfEndR(m) (VposR(MdfEnd(m))) /* row */
- #define MdfFrm(m) ((m)->mfrm) /* border */
- #define MdfFrmT(m) (BoxTyp(MdfFrm(m))) /* type */
-
- TesSeRact CXL V5.5 User's Guide Page 47
- #define MdfFrmA(m) (BoxAtr(MdfFrm(m))) /* attr */
- #define MdfWat(m) ((m)->mwat) /* window attr */
- #define MdfTyp(m) ((m)->mtyp) /* type mask */
- #define MdfHor(m) (0 != (MdfTyp(m) & MNU_HOR)) /*horizontal */
- #define MdfVer(m) (0 != (MdfTyp(m) & MNU_VER)) /*vertical */
- #define MdfOmn(m) (0 != (MdfTyp(m) & MNU_OMN)) /*omnidirect */
- #define MdfPul(m) (0 != (MdfTyp(m) & MNU_PUL)) /*pull-down */
- #define MdfNqs(m) (0 != (MdfTyp(m) & MNU_NQS)) /*no quicksel*/
- #define MdfSav(m) (0 != (MdfTyp(m) & MNU_SAV)) /*save barpos*/
- #define MdfDsp(m) (0 != (MdfTyp(m) & MNU_DSP)) /*always disp*/
- #define MdfUse(m) (0 != (MdfTyp(m) & MNU_USE)) /*use current*/
- #define MdfWid(m) ((m)->mwid) /* bar width */
- #define MdfOfs(m) ((m)->mofs) /* text offset */
- #define MdfTat(m) ((m)->mtat) /* text attribute */
- #define MdfSat(m) ((m)->msat) /* select char attr */
- #define MdfNat(m) ((m)->mnat) /* non-select attr */
- #define MdfBat(m) ((m)->mbat) /* bar attribute */
-
- #define IdfPrv(i) ((i)->iprv) /* previous IdfT */
- #define IdfNxt(i) ((i)->inxt) /* next IdfT */
- #define IdfSub(i) ((i)->isub) /* submenu MdfT */
- #define IdfStr(i) ((i)->istr) /* selection text */
- #define IdfTxt(i) ((i)->itxt) /* description text */
- #define IdfSel(i) ((i)->isel) /* "select" function */
- #define IdfBef(i) ((i)->ibef) /* "before" function */
- #define IdfAft(i) ((i)->iaft) /* "after" function */
- #define IdfKey(i) ((i)->ikey) /* hot key */
- #define IdfTag(i) ((i)->itag) /* tag ID */
- #define IdfHlp(i) ((i)->ihlp) /* help tag */
- #define IdfSpo(i) ((i)->ispo) /* text pos */
- #define IdfSpoW(i) (VposW(IdfSpo(i))) /* word */
- #define IdfSpoC(i) (VposC(IdfSpo(i))) /* col */
- #define IdfSpoR(i) (VposR(IdfSpo(i))) /* row */
- #define IdfDpo(i) ((i)->idpo) /* description pos */
- #define IdfDpoW(i) (VposW(IdfDpo(i))) /* word */
- #define IdfDpoC(i) (VposC(IdfDpo(i))) /* col */
- #define IdfDpoR(i) (VposR(IdfDpo(i))) /* row */
- #define IdfDat(i) ((i)->idat) /* description attr */
- #define IdfChr(i) ((i)->ichr) /* quick select char */
- #define IdfMsk(i) ((i)->imsk) /* feature mask */
- #define IdfPul(i) (0 != (IdfMsk(i) & ITM_PUL)) /*pull-down */
- #define IdfNsl(i) (0 != (IdfMsk(i) & ITM_NSL)) /*not select */
- #define IdfCaf(i) (0 != (IdfMsk(i) & ITM_AFT)) /*close after*/
- #define IdfCal(i) (0 != (IdfMsk(i) & ITM_ALL)) /*close all */
- #define IdfCbf(i) (0 != (IdfMsk(i) & ITM_BEF)) /*close befor*/
- #define IdfDsp(i) (0 != (IdfMsk(i) & ITM_DSP)) /*redisplay */
- #define IdfLen(i) ((i)->ilen) /* text length */
- #define IdfCpo(i) ((i)->icpo) /* center position */
- #define IdfCpoW(i) (VposW(IdfCpo(i))) /* word */
- #define IdfCpoC(i) (VposC(IdfCpo(i))) /* col */
- #define IdfCpoR(i) (VposR(IdfCpo(i))) /* row */
-
-
-
-
-
-
-
- Page 48 TesSeRact CXL V5.5 User's Guide
- ---------------------------------------------------------------------------
-
- Entry System
-
-
- ---------------------------------------------------------------------------
-
- NAME........._EntCtl
-
- DESCRIPTION
- This global variable is used to maintain the Entry System for
- filling in forms built by TCXL functions.
-
- DECLARATION
- GBL EdfP CDC _EntCtl;
-
- EQUATES
- /* Field Feature Bits */
- #define FLD_NUL 0x0000 /* no special features defined */
- #define FLD_LWR 0x0001 /* convert chars to lowercase */
- #define FLD_UPR 0x0002 /* convert chars to uppercase */
- #define FLD_MIX 0x0004 /* convert chars to mixed case */
- #define FLD_PAS 0x0008 /* do not echo typed-in chars */
- #define FLD_NUM 0x0010 /* treat field as numeric */
- #define FLD_CUR 0x0020 /* currency field */
- #define FLD_NWR 0x0040 /* no auto-wrap to next field */
- #define FLD_LJS 0x0080 /* left justify */
- #define FLD_RJS 0x0100 /* right justify */
- #define FLD_TRM 0x0200 /* trim end spaces */
-
- /* Field Movement */
- #define FDF_MOV 0x0F /* movement */
- #define FDF_BEG 0x01 /* to first field */
- #define FDF_END 0x02 /* to last field */
- #define FDF_UP 0x04 /* to previous field */
- #define FDF_DWN 0x08 /* to next field */
-
- /* EntFld() field edit-modes */
- #define FLD_INI 0x00 /* initial mode */
- #define FLD_CHG 0x01 /* change mode */
- #define FLD_CND 0x02 /* conditional-update mode */
- /* Field Control */
- #define FDF_MOD 0x70 /* update mode */
- #define FDF_INI 0x10 /* initial */
- #define FDF_CHG 0x20 /* change */
- #define FDF_CND 0x40 /* conditional */
- #define FDF_DSP 0x80 /* re-display */
-
- /* Entry Control */
- #define EDF_NUM 0x01 /* decimal format field */
- #define EDF_CUR 0x02 /* currency field formatting */
- #define EDF_INS 0x04 /* insert mode */
- #define EDF_HIL 0x08 /* highlight field */
- #define EDF_KEY 0x80 /* field hot-keys assigned */
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 49
- ACCESS MACROS
- /* entry form object */
- #define EdfTop(e) ((e)->etop) /* head FdfT */
- #define EdfFld(e) ((e)->efld) /* current FdfT */
- #define EdfGet(e) ((e)->eget) /* get function */
- #define EdfTrm(e) ((e)->etrm) /* terminating key */
- #define EdfFmt(e) ((e)->efmt) /* format string */
- #define EdfBfr(e) ((e)->ebfr) /* buffer string */
- #define EdfBas(e) ((e)->ebas) /* buffer base */
- #define EdfSep(e) ((e)->esep) /* word separators */
- #define EdfPos(e) ((e)->epos) /* window position */
- #define EdfPosW(e) (VposW(EdfPos(e))) /* word */
- #define EdfPosC(e) (VposC(EdfPos(e))) /* col */
- #define EdfPosR(e) (VposR(EdfPos(e))) /* row */
- #define EdfLen(e) ((e)->elen) /* field-length */
- #define EdfDec(e) ((e)->edec) /* decimal-position */
- #define EdfCtl(e) ((e)->ectl) /* Field Control */
- #define EdfFat(e) ((e)->efat) /* field attribute */
- #define EdfTat(e) ((e)->etat) /* text attribute */
-
- OTHER RELATED MACROS
-
- /* entry field object */
- #define FdfPrv(f) ((f)->fprv) /* previous FdfT */
- #define FdfNxt(f) ((f)->fnxt) /* next FdfT */
- #define FdfStr(f) ((f)->fstr) /* receiving string */
- #define FdfBfr(f) ((f)->fbfr) /* temp string */
- #define FdfFmt(f) ((f)->ffmt) /* format string */
- #define FdfVal(f) ((f)->fval) /* "valid" function */
- #define FdfBef(f) ((f)->fbef) /* "before" function */
- #define FdfAft(f) ((f)->faft) /* "after" function */
- #define FdfKey(f) ((f)->fkey) /* hotkey */
- #define FdfMsk(f) ((f)->fmsk) /* feature mask */
- #define FdfTag(f) ((f)->ftag) /* tag ID */
- #define FdfHlp(f) ((f)->fhlp) /* help category */
- #define FdfPos(f) ((f)->fpos) /* position */
- #define FdfPosW(f) (VposW(FdfPos(f))) /* word */
- #define FdfPosC(f) (VposC(FdfPos(f))) /* col */
- #define FdfPosR(f) (VposR(FdfPos(f))) /* row */
- #define FdfCtl(f) ((f)->fctl) /* control flags */
- #define FdfMov(f) (0 != (FdfCtl(f) & FDF_MOV)) /* movement */
- #define FdfBeg(f) (0 != (FdfCtl(f) & FDF_BEG)) /* to first */
- #define FdfEnd(f) (0 != (FdfCtl(f) & FDF_END)) /* to last */
- #define FdfUp(f) (0 != (FdfCtl(f) & FDF_UP)) /*to previous*/
- #define FdfDwn(f) (0 != (FdfCtl(f) & FDF_DWN)) /* to next */
- #define FdfLen(f) ((f)->flen) /* buffer length */
- #define FdfDec(f) ((f)->fdec) /* decimal position */
-
-
-
-
-
-
-
-
-
-
-
- Page 50 TesSeRact CXL V5.5 User's Guide
- ---------------------------------------------------------------------------
-
- Selection System
-
-
- ---------------------------------------------------------------------------
-
- NAME.........SelPtr
- .............SelNdx
-
- DESCRIPTION
- Although the structures and variables in the Selection System are
- internal only, these two global variables are provided to allow
- users access to the currently-highlighted item. This would
- normally be used in a function bound to a special key that needed
- to know what item is currently selected.
-
- DECLARATION
- GBL ChrP CDC SelPtr; /* Current Selected-Item Text */
- GBL IntT CDC SelNdx; /* Current Selected-Item Index */
-
- ---------------------------------------------------------------------------
-
- Help System
-
-
- ---------------------------------------------------------------------------
-
- NAME........._HlpCtl
-
- DESCRIPTION
- This is the global help control variable. All help functions, both
- automatic and user-callable, access this control structure for the
- help system.
-
- DECLARATION
-
- GBL HctlP CDC _HlpCtl;
-
-
- EQUATES
- #define HLP_STK 20 /* help-stack depth */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 51
- ACCESS MACROS
- #define HctlStk(h,i) ((h)->hstk[i]) /* stack-element[i] */
- #define HctlFil(h) ((h)->hfil) /* filename */
- #define HctlOpn(h) ((h)->hopn) /* open-function */
- #define HctlPtr(h) ((h)->hptr) /* stack-pointer */
- #define HctlKey(h) ((h)->hkey) /* hot-key */
- #define HctlWat(h) ((h)->hwat) /* window attr */
- #define HctlTat(h) ((h)->htat) /* text attr */
- #define HctlSat(h) ((h)->hsat) /* select attr */
- #define HctlBat(h) ((h)->hbat) /* bar attr */
- #define HctlBeg(h) ((h)->hbeg) /* start pos */
- #define HctlBegW(h) (VposWrd((h)->hbeg)) /* word */
- #define HctlBegR(h) (VposRow((h)->hbeg)) /* row */
- #define HctlBegC(h) (VposCol((h)->hbeg)) /* col */
- #define HctlEnd(h) ((h)->hend) /* end pos */
- #define HctlEndW(h) (VposWrd((h)->hend)) /* word */
- #define HctlEndR(h) (VposRow((h)->hend)) /* row */
- #define HctlEndC(h) (VposCol((h)->hend)) /* col */
- #define HctlBox(h) ((h)->hbox) /* frame type */
- #define HctlFlg(h) ((h)->hflg) /* flag bits */
- #define HctlTtl(h) (0 != ((h)->hflg & 0x01)) /*display title?*/
-
-
- ---------------------------------------------------------------------------
-
- Window System
-
- ---------------------------------------------------------------------------
-
- NAME........._WinCtl
-
- DESCRIPTION
- This structure is used to hold all global window information, and
- directly ties the windows to the video subsystem. Macros are
- declared in TCXLwin.H that are used to access the various members
- of this structure.
-
- DECLARATION
-
- GBL WctlT CDC _WinCtl; /* global window info */
-
-
- EQUATES
- /* Border Sides */
- #define BRD_TOP 0x00 /* Top Side */
- #define BRD_BOT 0x01 /* Bottom Side */
- #define BRD_LFT 0x02 /* Left Side */
- #define BRD_RGT 0x03 /* Right Side */
-
- /* Border Types */
- #define BOX_SNG 0x00 /* all single */
- #define BOX_DBL 0x01 /* all double */
- #define BOX_VER 0x02 /* horiz single, vert double */
- #define BOX_HOR 0x03 /* horiz double, vert single */
- #define BOX_HVY 0x04 /* heavy lines */
- #define BOX_SPA 0x05 /* spaces */
-
-
- Page 52 TesSeRact CXL V5.5 User's Guide
- /* Centering Flags */
- #define CNT_HOR 0x01 /* Center Horizontal */
- #define CNT_VER 0x02 /* Center Vertical */
- #define CNT_CNT 0x03 /* Center Both */
-
- /* Direction Codes */
- #define DIR_DWN 0x00 /* Down */
- #define DIR_UP 0x01 /* Up */
- #define DIR_LFT 0x02 /* Left */
- #define DIR_RGT 0x03 /* Right */
-
- /* Title Positions */
- #define TTL_LFT 0x01 /* left justified */
- #define TTL_CNT 0x02 /* centered */
- #define TTL_RGT 0x03 /* right justified */
-
-
- ACCESS MACROS
- #define WctlAct (_WinCtl.wact) /* active window */
- #define WctlHid (_WinCtl.whid) /* top hidden window */
- #define WctlFun (_WinCtl.wfun) /* fill function */
- #define WctlHdl (_WinCtl.whdl) /* last handle */
- #define WctlHlp (_WinCtl.whlp) /* help category */
- #define WctlOpn (_WinCtl.wopn) /* total open */
- #define WctlEsc (_WinCtl.wesc) /* [Esc] check */
- #define WctlTab (_WinCtl.wtab) /* tab width */
- #define WctlFil (_WinCtl.wfil) /* fill char */
- #define WctlFlg (_WinCtl.wflg) /* flag byte */
-
- OTHER RELATED MACROS
- #define BoxTyp(b) ((b).btyp) /* Type of Border */
- #define BoxAtr(b) ((b).batr) /* Attribute of Border */
-
- #define TtlStr(t) ((t).tstr) /* Title String */
- #define TtlPos(t) ((t).tpos) /* Title Position */
- #define TtlAtr(t) ((t).tatr) /* Title Attribute */
-
- #define WdfPrv(w) ((w)->wprv) /* previous WdfT */
- #define WdfNxt(w) ((w)->wnxt) /* next WdfT */
- #define WdfBfr(w) ((w)->wbfr) /* buffer */
- #define WdfSbf(w) ((w)->wsbf) /* shadow buffer */
- #define WdfTtl(w) ((w)->wttl) /* title */
- #define WdfTtlS(w) (TtlStr(WdfTtl(w))) /* string */
- #define WdfTtlP(w) (TtlPos(WdfTtl(w))) /* position */
- #define WdfTtlA(w) (TtlAtr(WdfTtl(w))) /* attribute */
- #define WdfHdl(w) ((w)->whdl) /* handle */
- #define WdfHlp(w) ((w)->whlp) /* help category */
- #define WdfBeg(w) ((w)->wbeg) /* start position */
- #define WdfBegW(w) (VposW(WdfBeg(w))) /* word */
- #define WdfBegC(w) (VposC(WdfBeg(w))) /* col */
- #define WdfBegR(w) (VposR(WdfBeg(w))) /* row */
- #define WdfEnd(w) ((w)->wend) /* end position */
- #define WdfEndW(w) (VposW(WdfEnd(w))) /* word */
- #define WdfEndC(w) (VposC(WdfEnd(w))) /* col */
- #define WdfEndR(w) (VposR(WdfEnd(w))) /* row */
- #define WdfPos(w) ((w)->wpos) /* cursor position */
- #define WdfPosW(w) (VposW(WdfPos(w))) /* word */
-
- TesSeRact CXL V5.5 User's Guide Page 53
- #define WdfPosC(w) (VposC(WdfPos(w))) /* col */
- #define WdfPosR(w) (VposR(WdfPos(w))) /* row */
- #define WdfFrm(w) ((w)->wfrm) /* border */
- #define WdfFrmT(w) (BoxTyp(WdfFrm(w))) /* type */
- #define WdfFrmA(w) (BoxAtr(WdfFrm(w))) /* attribute */
- #define WdfDat(w) ((w)->wdat) /* default attribute */
- #define WdfCat(w) ((w)->wcat) /* current attribute */
- #define WdfSat(w) ((w)->wsat) /* shadow attribute */
- #define WdfBrd(w) ((w)->wbrd) /* border */
-
-
- ---------------------------------------------------------------------------
-
-
-
- Information Subsystem
-
-
- ---------------------------------------------------------------------------
-
- NAME........._HdwCtl
-
- DESCRIPTION
- This is the declaration of the global hardware confiduration
- information, based on the Hdw structure (Page 38).
-
- DECLARATION
-
- GBL HdwT CDC _HdwCtl; /* Global Hardware-data object */
-
-
- EQUATES
- /* Machine ID's returned by Machid() */
- #define IBMPC 0xFF /* IBM PC */
- #define IBMPCXT 0xFE /* IBM PC/XT, Portable, old DeskPro*/
- #define IBMPCJR 0xFD /* IBM PCjr */
- #define IBMPCAT 0xFC /* IBM PC/AT, XT/286, PS/2 50,60 */
- #define IBMPCXT2 0xFB /* IBM PC/XT */
- #define IBMPS30 0xFA /* IBM PS/2 model 30 */
- #define IBMCONV 0xF9 /* IBM PC Convertible */
- #define IBMPS80 0xF8 /* IBM PS/2 model 80 */
- #define SPERRYPC 0x30 /* Sperry PC */
- #define CPQPORT 0x2D /* old Compaq portable */
- #define CPQPLUS 0x9A /* old Compaq plus */
- #define HP110 0xB6 /* HP-110 portable */
-
- /* Hardware option flag bits */
- #define HDW_GAM 0x01 /* game-adapter */
- #define HDW_NDP 0x02 /* math-coprocessor */
- #define HDW_MOU 0x04 /* PS/2 mouse */
- #define HDW_MDM 0x08 /* PS/2 modem */
- #define HDW_C40 0x10 /* 40-col color */
- #define HDW_C80 0x20 /* 80-col color */
- #define HDW_M80 0x40 /* 80-col mono */
-
-
-
-
- Page 54 TesSeRact CXL V5.5 User's Guide
- ACCESS MACROS
- #define HdwPar (_HdwCtl.hpar) /* parallel ports */
- #define HdwSer (_HdwCtl.hser) /* serial ports */
- #define HdwDrv (_HdwCtl.hdrv) /* floppy-drives */
- #define HdwFlg (_HdwCtl.hflg) /* option-flags */
- #define HdwGam (0 != (HdwFlg & HDW_GAM)) /* game-adapter */
- #define HdwNdp (0 != (HdwFlg & HDW_NDP)) /* math-coprocessor*/
- #define HdwMou (0 != (HdwFlg & HDW_MOU)) /* PS/2 mouse */
- #define HdwMdm (0 != (HdwFlg & HDW_MDM)) /* PS/2 modem */
- #define HdwC40 (0 != (HdwFlg & HDW_C40)) /* 40-col color */
- #define HdwC80 (0 != (HdwFlg & HDW_C80)) /* 80-col color */
- #define HdwM80 (0 != (HdwFlg & HDW_M80)) /* 80-col mono */
-
- #define gameport() HdwGam /* obsolete CXL functions */
- #define mathchip() HdwNdp
- #define numflop() HdwDrv
- #define numpar() HdwPar
- #define numser() HdwSer
-
-
- ---------------------------------------------------------------------------
-
- NAME........._TcxlCtl
-
- DESCRIPTION
- This is the TesSeRact CXL Control Object. It contains system-wide
- error, debugging and operating information.
-
- DECLARATION
- GBL TcxlT CDC _TcxlCtl;
-
- EQUATES
- /* TcxlSys values */
- #define SYS_DOS 0x0000 /* MS-DOS/PC-DOS/DR_DOS */
- #define SYS_JDS 0x0001 /* Japan DOS */
- #define SYS_OS2 0x0002 /* OS/2 */
- #define SYS_XNX 0x0003 /* MS/SCO Xenix */
- #define SYS_UNX 0x0004 /* AT&T Unix */
- #define SYS_BSD 0x0005 /* BSD Unix */
- #define SYS_AIX 0x0006 /* IBM AIX */
- #define SYS_VMS 0x0007 /* DEC VMS */
- /* TcxlEnv bits (DOS) */
- #define ENV_MOU 0x0001 /* Mouse */
- #define ENV_KEY 0x0002 /* Enhanced Keyboard */
- #define ENV_UV 0x0004 /* Ultravision */
- #define ENV_ESA 0x0010 /* EISA bus */
- #define ENV_MCA 0x0020 /* MCA bus */
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 55
- ACCESS MACROS
- #define TcxlErr (_TcxlCtl.terr) /* error code */
- #define TcxlDbg (_TcxlCtl.tdbg) /* debug-level */
- #define TcxlSys (_TcxlCtl.tsys) /* system */
- #define TcxlDos (TcxlSys == SYS_DOS) /* DOS */
- #define TcxlJds (TcxlSys == SYS_JDS) /* Japan DOS */
- #define TcxlOs2 (TcxlSys == SYS_OS2) /* OS/2 */
- #define TcxlXnx (TcxlSys == SYS_XNX) /* Xenix */
- #define TcxlUnx (TcxlSys == SYS_UNX) /* AT&T Unix */
- #define TcxlBsd (TcxlSys == SYS_BSD) /* BSD Unix */
- #define TcxlAix (TcxlSys == SYS_AIX) /* IBM AIX */
- #define TcxlVms (TcxlSys == SYS_VMS) /* DEC VMS */
- #define TcxlEnv (_TcxlCtl.tenv) /* environment */
- #define TcxlMou (0 != (TcxlEnv & ENV_MOU)) /* rodent */
- #define TcxlKey (0 != (TcxlEnv & ENV_KEY)) /* 101-key */
- #define TcxlUv (0 != (TcxlEnv & ENV_UV)) /* Ultravision */
- #define TcxlEsa (0 != (TcxlEnv & ENV_ESA)) /* EISA bus */
- #define TcxlMca (0 != (TcxlEnv & ENV_MCA)) /* MCA bus */
- #define TcxlCfg (_TcxlCtl.tcfg) /* configuration*/
-
-
- ---------------------------------------------------------------------------
-
- Memory Subsystem
-
-
- ---------------------------------------------------------------------------
-
- NAME........._MemCtl
-
- DESCRIPTION
- This is the declaration of the global memory control structure.
- All EMS and XMS support is passed through this structure.
-
- DECLARATION
- GBL _MemT CDC _MemCtl;
-
- EQUATES
- /* Memory-flag bits */
- #define MEM_DPMI 0x01 /* DPMI installed */
- #define MEM_VCPI 0x02 /* VCPI installed */
- #define MEM_EMS 0x04 /* EMS installed */
- #define MEM_XMS 0x08 /* XMS installed */
- #define MEM_HMA 0x10 /* HMA installed */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 56 TesSeRact CXL V5.5 User's Guide
- #define EMS_BadSoft 0x80 /* EMS error-codes */
- #define EMS_BadHdw 0x81
- #define EMS_Busy 0x82
- #define EMS_BadHandle 0x83
- #define EMS_BadFun 0x84
- #define EMS_NoHandles 0x85
- #define EMS_MapErr 0x86
- #define EMS_NotTotal 0x87
- #define EMS_NotFree 0x88
- #define EMS_NotZero 0x89
- #define EMS_BadPage 0x8A
- #define EMS_BadPhys 0x8B
- #define EMS_SaveFull 0x8C
- #define EMS_SaveDup 0x8D
- #define EMS_NoSave 0x8E
- #define EMS_BadSub 0x8F
-
- #define XMS_BadFun 0x80 /* XMS error-codes */
- #define XMS_Vdisk 0x81
- #define XMS_A20Err 0x82
- #define XMS_DrivErr 0x8E
- #define XMS_Fatal 0x8F
- #define XMS_NoHMA 0x90
- #define XMS_HMABusy 0x91
- #define XMS_HMASmall 0x92
- #define XMS_HMAFree 0x93
- #define XMS_NoXMS 0xA0
- #define XMS_NoHandle 0xA1
- #define XMS_BadHandle 0xA2
- #define XMS_BadSrc 0xA3
- #define XMS_BadSOff 0xA4
- #define XMS_BadDst 0xA5
- #define XMS_BadDOff 0xA6
- #define XMS_BadLen 0xA7
- #define XMS_BadOver 0xA8
- #define XMS_Parity 0xA9
- #define XMS_NotLock 0xAA
- #define XMS_IsLock 0xAB
- #define XMS_LockOvr 0xAC
- #define XMS_LockFail 0xAD
- #define XMS_SmallUMB 0xB0
- #define XMS_NoUMB 0xB1
- #define XMS_BadUMBSeg 0xB2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 57
- ACCESS MACROS
- #define MemMflg (_MemCtl.mMflg) /* Memory Flags */
- #define MemDPMI (0 != (MemMflg & MEM_DPMI)) /*DPMI installed*/
- #define MemVCPI (0 != (MemMflg & MEM_VCPI)) /*VCPI installed*/
- #define MemEMS (0 != (MemMflg & MEM_EMS)) /* EMS installed */
- #define MemXMS (0 != (MemMflg & MEM_XMS)) /* XMS installed */
- #define MemHMA (0 != (MemMflg & MEM_HMA)) /* HMA installed */
- #define MemDpro (_MemCtl.mDpro) /* DPMI Processor */
- #define MemD286 (0x02 == MemDpro) /* 286 */
- #define MemD386 (0x03 == MemDpro) /* 386 */
- #define MemD486 (0x04 == MemDpro) /* 486 */
- #define MemDflg (_MemCtl.mDflg) /* DPMI Flags */
- #define MemDf32 (1 = MemDflg) /* 32 Bit Support */
- #define MemDent (_MemCtl.mDent) /* DPMI entry point */
- #define MemDver (_MemCtl.mDver) /* DPMI version */
- #define MemVver (_MemCtl.mVver) /* VCPI Version */
- #define MemEseg (_MemCtl.mEseg) /* EMS Base Segment */
- #define MemEver (_MemCtl.mEver) /* EMS Version */
- #define MemEfre (_MemCtl.mEfre) /* EMS Free (16k page) */
- #define MemEtot (_MemCtl.mEtot) /* EMS Total (16k page) */
- #define MemEerr (_MemCtl.mEerr) /* EMS Error Code */
- #define MemXerr (_MemCtl.mXerr) /* XMS Error Code */
- #define MemXver (_MemCtl.mXver) /* XMS Version */
- #define MemXent (_MemCtl.mXent) /* XMS Entry Point */
- #define MemXint (_MemCtl.mXint) /* XMS Internal Version */
- #define MemHfre (_MemCtl.mHfre) /* HMA free (para) */
- #define MemXtot (_MemCtl.mXtot) /* XMS total free (1k) */
- #define MemXlrg (_MemCtl.mXlrg) /* XMS largest free (1k)*/
- #define MemUfre (_MemCtl.mUfre) /* Largest free UMB */
-
-
- OTHER RELATED MACROS
- #define XmsSlen(x) ((x)->xSlen) /* XMS Move Structure */
- #define XmsShdl(x) ((x)->xShdl)
- #define XmsSptr(x) ((x)->xSptr)
- #define XmsTdhl(x) ((x)->xTdhl)
- #define XmsTptr(x) ((x)->xTptr)
-
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 58 TesSeRact CXL V5.5 User's Guide
-
- Printer Subsystem
-
-
- ---------------------------------------------------------------------------
-
- NAME.........Printer
-
- There are no global variables associated with the Printer Subsystem;
- however, there are a series of equates for Epson-compatible printers.
-
- EQUATES
- #define L_BFOFF "\033F" /* turns bold faced printing off */
- #define L_BFON "\033E" /* turns bold faced printing on */
- #define L_DWOFF "\033W0" /* turns double wide printing off */
- #define L_DWON "\033W1" /* turns double wide printing on */
- #define L_ELITE "\033M" /* sets printer in 12 CPI mode */
- #define L_INIT "\033@" /* initializes printer */
- #define L_ITALOFF "\0335" /* turns italicized printing off */
- #define L_ITALON "\0334" /* turns italicized printing on */
- #define L_PICA "\033P" /* sets printer in 10 CPI mode */
- #define L_ULOFF "\033-0" /* turns underlined printing off */
- #define L_ULON "\033-1" /* turns underlined printing on */
-
- ---------------------------------------------------------------------------
-
- OpSys Subsystem
-
-
- NAME.........OpSys
-
- Please note there are no global variables associated with the OpSys
- Subsystem. However, we do have macros and equates associated with the
- OpSys Subsystem structures.
-
- EQUATES
- #define FA_RDO 0x01 /* read only attribute */
- #define FA_HID 0x02 /* hidden */
- #define FA_SYS 0x04 /* system */
- #define FA_VOL 0x08 /* volume label */
- #define FA_DIR 0x10 /* directory */
- #define FA_ARC 0x20 /* archive */
- #define FA_DEV 0x40 /* device *UNDOC* */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 59
- ACCESS MACROS
- #define FfbDos(f) ((f).fdos) /* DOS-reserved */
- #define FfbAtr(f) ((f).fatr) /* file attribute */
- #define FfbRdo(f) (0 != ((f).fatr & FA_RDO)) /* read-only */
- #define FfbHid(f) (0 != ((f).fatr & FA_HID)) /* hidden */
- #define FfbSys(f) (0 != ((f).fatr & FA_SYS)) /* system */
- #define FfbVol(f) (0 != ((f).fatr & FA_VOL)) /* volume */
- #define FfbDir(f) (0 != ((f).fatr & FA_DIR)) /* directory */
- #define FfbArc(f) (0 != ((f).fatr & FA_ARC)) /* archive */
- #define FfbDev(f) (0 != ((f).fatr & FA_DEV)) /* device */
- #define FfbTim(f) ((f).ftim) /* packed time */
- #define FfbDat(f) ((f).fdat) /* packed date */
- #define FfbSiz(f) ((f).fsiz) /* file size */
- #define FfbNam(f) ((f).fnam) /* file name */
- #define FfbDot(f) ((f).fnam[0]=='.') /* '.' or '..' */
- /* parent dir */
- #define FfbPar(f) (FfbDot(f) && ((f).fnam[1] == '.'))
-
-
- ---------------------------------------------------------------------------
-
- Video Access Subsystem
-
-
- ---------------------------------------------------------------------------
-
- NAME........._VidCtl
-
- DESCRIPTION
- This structure is used to control all video accesses. Macros are
- declared in TCXLVID.H that are used to access the various members
- of this structure.
-
- DECLARATION
-
- GBL VctlT CDC _VidCtl; /* global video-control */
-
-
- EQUATES
- #define V_NONE 0x00 /* adapter types returned */
- #define V_MDA 0x01 /* ... by vidtype() */
- #define V_EGAMONO 0x02
- #define V_MCGAMONO 0x03
- #define V_VGAMONO 0x04
- #define V_HGC 0x05
- #define V_HGCPLUS 0x06
- #define V_INCOLOR 0x07
- #define V_CGA 0x08
- #define V_EGA 0x09
- #define V_MCGA 0x0A
- #define V_VGA 0x0B
-
-
-
-
-
-
-
- Page 60 TesSeRact CXL V5.5 User's Guide
- /* video parameter settings */
- #define VP_DMA 0x00 /* direct screen writes */
- #define VP_CGA 0x01 /* direct screen writes, no snow */
- #define VP_BIO 0x02 /* BIOS screen writes */
- #define VP_MON 0x03 /* monochrome translate on */
- #define VP_COL 0x04 /* monochrome translate off */
-
- /* video-flag bits */
- #define VF_MON 0x01 /* monochrome adapter */
- #define VF_MAP 0x02 /* map to mono attributes */
- #define VF_CGA 0x04 /* suppress CGA snow */
- #define VF_BIO 0x08 /* use video BIOS */
- #define VF_DQV 0x10 /* DesqView installed */
-
- /* Ultravision Flags */
- #define VU_RES 0x80 /* Ultravision is resident */
- #define VU_ACT 0x40 /* Ultravision is active */
-
- /* Ultravision Card Codes */
- #define VU_GEC 0x00 /* Generic EGA w/ Color monitor */
- #define VU_GEM 0x04 /* Generic EGA w/ Mono monitor */
- #define VU_GVV 0x05 /* Generic VGA w/ VGA monitor */
- #define VU_PVV 0x06 /* Paradise VGA w/VGA monitor */
- #define VU_HVV 0x07 /* Super VGA w/VGA monitor */
- #define VU_BEE 0x0A /* UV EGA Booster w/EGA monitor */
- #define VU_NEE 0x0B /* NEC GB-1 w/EGA monitor */
- #define VU_SEE 0x0C /* Genoa SuperEGA w/EGA monitor */
- #define VU_AEE 0x0D /* Alt EGA Booster w/EGA monitor */
- #define VU_AEM 0x0E /* Alt EGA Booster w/Mono monitor */
- #define VU_GVA 0x19 /* Generic VGA w/Auto monitor */
- #define VU_PVA 0x1A /* Paradise VGA w/Auto monitor */
- #define VU_HVA 0x1B /* Super VGA w/Auto monitor */
- #define VU_BEA 0x14 /* UV EGA Booster w/Auto monitor */
- #define VU_NEA 0x15 /* NEC GB-1 w/Auto monitor */
- #define VU_SEA 0x16 /* Genoa SuperEGA w/Auto monitor */
- #define VU_AEA 0x17 /* Alt EGA Booster w/Auto monitor */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 61
- /* Ultravision Video Modes */
- #define VU_A25 0x11 /* 80x25 */
- #define VU_A43 0x12 /* 80x43 on EGA, 80x50 on VGA */
- #define VU_A34 0x13 /* 80x34 on EGA, 80x36 on VGA */
- #define VU_A60 0x14 /* 80x60 on EGA, 80x63 on VGA */
- #define VU_B25 0x19 /* 94x25 */
- #define VU_B43 0x1A /* 94x43 on EGA, 94x50 on VGA */
- #define VU_B36 0x1B /* 94x36 */
- #define VU_B63 0x1C /* 94x63 */
- #define VU_C25 0x21 /* 108x25 */
- #define VU_C43 0x22 /* 108x43 on EGA, 108x50 on VGA */
- #define VU_C34 0x23 /* 108x34 on EGA, 108x36 on VGA */
- #define VU_C60 0x24 /* 108x60 on EGA, 108x63 on VGA */
- #define VU_D25 0x31 /* 120x25 */
- #define VU_D43 0x32 /* 120x43 on EGA, 120x50 on VGA */
- #define VU_D36 0x39 /* 120x36 */
- #define VU_D63 0x3A /* 120x63 */
- #define VU_E25 0x33 /* 132x25 */
- #define VU_E44 0x34 /* 132x44, 132x50 on SuperVGA only */
- #define VU_E36 0x3B /* 132x36 */
- #define VU_E60 0x3C /* 132x60 */
-
- ACCESS MACROS
- #define VidSeg (_VidCtl.vseg) /* buffer segment */
- #define VidHdw (_VidCtl.vhdw) /* adapter type */
- #define VidMod (_VidCtl.vmod) /* display mode */
- #define VidFlg (_VidCtl.vflg) /* flags */
- #define VidMon (0 != (VidFlg & VF_MON)) /* monochrome */
- #define VidMap (0 != (VidFlg & VF_MAP)) /* map to mono */
- #define VidCga (0 != (VidFlg & VF_CGA)) /* CGA snow */
- #define VidBio (0 != (VidFlg & VF_BIO)) /* use BIOS */
- #define VidDqv (0 != (VidFlg & VF_DQV)) /* DesQview */
- #define VidPag (_VidCtl.vpag) /* display page */
- #define VidWid (_VidCtl.vwid) /* columns wide */
- #define VidDep (_VidCtl.vdep) /* rows deep */
- #define VidCur (_VidCtl.vcur) /* cursor save */
- #define VidUvf (_VidCtl.vuvf) /* UV flags */
- #define VuvRes (0 != (VidUvf & VU_RES)) /* resident */
- #define VuvAct (0 != (VidUvf & VU_ACT)) /* active */
- #define VidUvc (_VidCtl.vuvc) /* UV card code */
- #define VidUvm (_VidCtl.vuvm) /* UV text mode */
-
-
- OTHER RELATED MACROS
- #define VcelW(x) ((x).cwrd) /* video cell as word */
- #define VcelC(x) ((x).c.chr) /* character */
- #define VcelA(x) ((x).c.atr) /* attribute */
-
- #define VcseW(x) ((x).cwrd) /* video cursor as word */
- #define VcseE(x) ((x).c.end) /* cursor stop line */
- #define VcseB(x) ((x).c.beg) /* cursor start line */
-
- #define VposW(x) ((x).pwrd) /* video position as word */
- #define VposC(x) ((x).p.col) /* column position */
- #define VposR(x) ((x).p.row) /* row position */
-
-
-
- Page 62 TesSeRact CXL V5.5 User's Guide
- ---------------------------------------------------------------------------
-
- Keyboard Access Subsystem
-
-
- ---------------------------------------------------------------------------
-
- NAME........._KeyCtl
- _KeyQue
-
- DESCRIPTION
- This structure is used for all input (keyboard/mouse) control
- throughout TCXL. Macros are declared in TCXLKEY.H that are used to
- access the various members of this structure. The global buffer
- _KeyQue holds the internal keyboard ring buffer.
-
- DECLARATION
- GBL KctlT CDC _KeyCtl; /* global key-control object */
-
- GBL KeyT CDC _KeyQue[]; /* global key-queue */
-
- EQUATES
- #define KEY_RSH 0x01 /* [right shift] pressed */
- #define KEY_LSH 0x02 /* [left shift] pressed */
- #define KEY_CTL 0x04 /* [Ctrl] pressed */
- #define KEY_ALT 0x08 /* [Alt] pressed */
- #define KEY_SCR 0x10 /* [Scroll Lock] toggled */
- #define KEY_NUM 0x20 /* [Num Lock] toggled */
- #define KEY_CAP 0x40 /* [Caps Lock] toggled */
- #define KEY_INS 0x80 /* [Ins] toggled */
-
- #define KEY_EXT 0x80 /* KctlFlg extended functions */
- #define KEY_MNU 0x01 /* KctlFlg currently in menu */
- #define KEY_SYS 0x02 /* KctlFlg internal usage */
- #define KEY_KBD 0x00 /* KctlSrc keyboard */
- #define KEY_QUE 0x01 /* KctlSrc key-queue */
- #define KEY_MOU 0x02 /* KctlSrc mouse */
-
- #define KEY_MAX 128 /* size of key-queue */
- #define KEY_BRK 0xFFFF /* Ctrl-Brk ret from _KeyGet */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 63
- ACCESS MACROS
- #define KctlFlg (_KeyCtl.kflg) /* control-flag */
- #define KctlMnu (0 != (KctlFlg & KEY_MNU)) /* in-menu */
- #define KctlExt (0 != (KctlFlg & KEY_EXT)) /* extended */
- #define KctlSrc (0 != (KctlFlg & KEY_SYS)) /* internal */
- #define KctlSrc (_KeyCtl.ksrc) /* keycode-source*/
- #define KctlKbd (KctlSrc == KEY_KBD) /* keyboard */
- #define KctlQue (KctlSrc == KEY_QUE) /* key-queue */
- #define KctlMou (KctlSrc == KEY_MOU) /* mouse */
- #define KctlBeg (_KeyCtl.kbeg) /* queue-head */
- #define KctlEnd (_KeyCtl.kend) /* queue-tail */
- #define KctlCnt (_KeyCtl.kcnt) /* queue-count */
- #define KctlMax (_KeyCtl.kmax) /* queue-size */
- #define KctlBas (_KeyCtl.kbas) /* queue-base */
- #define KctlBnd (_KeyCtl.kbnd) /* binding list */
- #define KctlIdl (_KeyCtl.kidl) /* idle function */
- #define KctlHlp (_KeyCtl.khlp) /* help keycode */
- #define KctlFun (_KeyCtl.kfun) /* help function */
-
- OTHER RELATED MACROS
- #define KcodKey(x) ((x).ckey) /* Kcod */
- #define KcodAsc(x) ((x).c.asc)
- #define KcodScn(x) ((x).c.scn)
- #define KbndPtr(b) ((b)->bptr) /* Kbnd */
- #define KbndFun(b) ((b)->bfun)
- #define KbndKey(b) ((b)->bkey)
- #define KbndRtn(b) ((b)->brtn)
-
-
-
- ---------------------------------------------------------------------------
-
- Mouse Access Subsystem
-
-
- ---------------------------------------------------------------------------
-
- NAME........._MouCtl
-
- DESCRIPTION
- This structure is used to control all mouse input. Macros are
- declared in TCXLMOU.H that are used to access the various members
- of this structure.
-
- DECLARATION
-
- GBL MouT CDC _MouCtl; /* global mouse-control */
-
-
- EQUATES
- #define MOU_NONE 0x00 /* no mouse support */
- #define MOU_KEYS 0x01 /* emulate arrow keys */
- #define MOU_CURS 0x02 /* free-moving cursor */
- #define MOU_FULL 0x03 /* full mouse support */
- #define MOU_3BTN 0x40 /* 3-button mouse */
- #define MOU_INIT 0x80 /* mouse initialized */
-
-
- Page 64 TesSeRact CXL V5.5 User's Guide
- ACCESS MACROS
- #define MouLvl (_MouCtl.mlvl) /* head level */
- #define MouNone (0 == (MouLvl & MOU_FULL)) /* support off*/
- #define MouKeys (0 != (MouLvl & MOU_KEYS)) /* arrow */
- #define MouCurs (0 != (MouLvl & MOU_CURS)) /* free */
- #define MouFull (0 != (MouLvl & MOU_FULL)) /* full */
- #define MouCol (_MouCtl.mcol) /* head column */
- #define MouRow (_MouCtl.mrow) /* head row */
- #define MouFlg (_MouCtl.mflg) /* global flags */
- #define MouInit (0 != (MouFlg & MOU_INIT)) /* initialized*/
- #define Mou3btn (0 != (MouFlg & MOU_3BTN)) /* 3-button */
- #define MouBtn (_MouCtl.mbtn) /* button-status */
- #define MouLeft (0 != MouBtn & 0x01) /* left */
- #define MouRght (0 != MouBtn & 0x02) /* right */
- #define MouCent (0 != MouBtn & 0x04) /* center */
- #define MouCnt (_MouCtl.mcnt) /* button-count */
- #define MouHor (_MouCtl.mhor) /* horiz. motion */
- #define MouVer (_MouCtl.mver) /* vert. motion */
- #define MouLkey (_MouCtl.mlkc) /* left keycode */
- #define MouRkey (_MouCtl.mrkc) /* right keycode */
- #define MouMkey (_MouCtl.mmkc) /* middle keycode*/
-
-
- ---------------------------------------------------------------------------
-
- Format Control Subsystem
-
-
- NAME........._FmtCtl
-
- DESCRIPTION
- This structure is used to hold all the information pertaining to
- formatted input and validation. Macros are declared in TCXLfmt.h
- to access this variable.
-
- DECLARATION
-
- GBL FmtT CDC _FmtCtl; /* global format-control object */
-
-
- EQUATES
- /* Format Escapes */
- #define FMT_CPY 0x01 /* 'C' copy to output */
- #define FMT_ESC 0x02 /* 'E' [Esc] detect */
- #define FMT_RTN 0x04 /* 'R' [CR] detect */
- #define FMT_PAS 0x08 /* 'P' password */
- #define FMT_LWR 0x10 /* 'L' lower case */
- #define FMT_MIX 0x20 /* 'M' mixed case */
- #define FMT_UPR 0x40 /* 'U' upper case */
- #define FMT_CNV 0x70 /* 'L|M|U' convert */
- #define FMT_END 0x80 /* end-of-format */
- #define FMT_TRM 0x84 /* end | 'R' terminate */
- #define FMT_INI 0x06 /* 'E|R' initial */
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 65
- /* Format Usages */
- #define FMT_GET 0x00 /* FmtGet() */
- #define FMT_WIN 0x01 /* WFmtGet() */
- #define FMT_ENT 0x02 /* EntFld() */
- #define FMT_NUM 0x04 /* decimal field */
- #define FMT_CUR 0x08 /* currency field */
-
-
- ACCESS MACROS
- #define FmtTgl (_FmtCtl.ftgl) /* option chars */
- #define FmtChr (_FmtCtl.fchr) /* control chars */
- #define FmtPut (_FmtCtl.fput) /* backspace function */
- #define FmtLen (_FmtCtl.flen) /* field length */
- #define FmtDec (_FmtCtl.fdec) /* decimal position */
- #define FmtOpt (_FmtCtl.fopt) /* option state */
- #define FmtCpy (0 != (FmtOpt & FMT_CPY)) /* copy to output */
- #define FmtEsc (0 != (FmtOpt & FMT_ESC)) /* [Esc] detect */
- #define FmtRtn (0 != (FmtOpt & FMT_RTN)) /* [CR] detect */
- #define FmtPas (0 != (FmtOpt & FMT_PAS)) /* password */
- #define FmtLwr (0 != (FmtOpt & FMT_LWR)) /* lower case */
- #define FmtMix (0 != (FmtOpt & FMT_MIX)) /* mixed case */
- #define FmtUpr (0 != (FmtOpt & FMT_UPR)) /* upper case */
- #define FmtCnv (0 != (FmtOpt & FMT_CNV)) /* convert */
- #define FmtEnd (0 != (FmtOpt & FMT_END)) /* end-of-format */
- #define FmtTrm (0 != (FmtOpt & FMT_TRM)) /* terminate */
- #define FmtUse (_FmtCtl.fuse) /* usage state */
- #define FmtGet (FmtUse == FMT_GET) /* FmtGet() */
- #define FmtWin (FmtUse == FMT_WIN) /* WFmtGet() */
- #define FmtEnt (FmtUse == FMT_ENT) /* EntFld() */
- #define FmtNum (0 != (FmtUse & FMT_NUM)) /* decimal */
- #define FmtCur (0 != (FmtUse & FMT_CUR)) /* currency */
- #define FmtPfx (_FmtCtl.fpfx) /* currency prefix */
- #define FmtSep (_FmtCtl.fsep) /* currency separator */
- #define FmtSfx (_FmtCtl.fsfx) /* currency suffix */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 66 TesSeRact CXL V5.5 User's Guide
- COPYRIGHT NOTICE AND LICENSE
-
- Innovative Data Concepts, hereby licenses you to: use the software; make as
- many copies of the shareware version of this software and documentation as
- you wish; give exact copies of the original shareware version to anyone;
- and distribute the shareware version of the software and documentation in
- its unmodified form via electronic means. There is no charge for any of the
- above.
-
- This is not free software. This license allows you to evaluate this
- software without charge for a period of 30 days. Any use of this product
- past this 30-day period is in violation of international copyright laws and
- will be prosecuted.
-
- No copy of the software may be distributed or given away without this
- accompanying documentation in machine-readable form; this notice must not
- be removed. ONLY COPIES OF THE SHAREWARE VERSION MAY BE DISTRIBUTED IN ANY
- FORM. IDC will provide disks with the shareware versions of ALL SWAP
- Utilities programs upon written request.
-
-
- Warranty
-
- There is no warranty of any kind associated with this software, and the
- copyright owner is not liable for damages of any kind. By using this
- software, you agree to this. Every effort has been made by Innovative Data
- Concepts to make this product bug-free. However, the nature of software
- development is that it is impossible to guarantee bug-free software. If a
- user reports a verifiable problem, IDC will make every best effort to
- correct it.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TesSeRact CXL V5.5 User's Guide Page 67
-